From a610e90b7abb138f72f1c55cb2b8b3e614f91720 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Tue, 24 Nov 2009 21:03:34 +0100 Subject: [PATCH] Fixes issue 4 -- The textarea of the content field now uses the full width in the admin --- dbtemplates/admin.py | 2 +- .../admin/dbtemplates/template/change_form.html | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 dbtemplates/templates/admin/dbtemplates/template/change_form.html diff --git a/dbtemplates/admin.py b/dbtemplates/admin.py index 22ca016..9eb6b50 100644 --- a/dbtemplates/admin.py +++ b/dbtemplates/admin.py @@ -18,7 +18,7 @@ class TemplateAdminForm(forms.ModelForm): Custom AdminForm to make the content textarea wider. """ content = forms.CharField( - widget=forms.Textarea({'cols': '80', 'rows': '24'}), + widget=forms.Textarea({'rows': '24'}), help_text=_("Leaving this empty causes Django to look for a template " "with the given name and populate this field with its content."), required=False) diff --git a/dbtemplates/templates/admin/dbtemplates/template/change_form.html b/dbtemplates/templates/admin/dbtemplates/template/change_form.html new file mode 100644 index 0000000..69b36aa --- /dev/null +++ b/dbtemplates/templates/admin/dbtemplates/template/change_form.html @@ -0,0 +1,11 @@ +{% extends "admin/change_form.html" %} + +{% block extrahead %} +{{ block.super }} + +{% endblock %}