From 7af74c6785082725c37719c71a9ac3bb6b84b5a9 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 10 Oct 2012 00:27:01 -0400 Subject: [PATCH] Set fixed size for the text area widget and inherit the change --- apps/bootstrap/forms.py | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/apps/bootstrap/forms.py b/apps/bootstrap/forms.py index ea8ba048fe..af8692554f 100644 --- a/apps/bootstrap/forms.py +++ b/apps/bootstrap/forms.py @@ -15,20 +15,31 @@ logger = logging.getLogger(__name__) class BootstrapSetupForm(forms.ModelForm): class Meta: model = BootstrapSetup + widgets = { + 'description': forms.widgets.Textarea(attrs={ + 'rows': 5, 'cols': 80, + } + ) + } class BootstrapSetupForm_view(DetailForm): class Meta: model = BootstrapSetup + widgets = { + 'description': forms.widgets.Textarea(attrs={ + 'rows': 5, 'cols': 80, + } + ) + } - -class BootstrapSetupForm_edit(forms.ModelForm): - class Meta: +class BootstrapSetupForm_edit(BootstrapSetupForm): + class Meta(BootstrapSetupForm.Meta): model = BootstrapSetup exclude = ('type',) -class BootstrapSetupForm_dump(forms.ModelForm): - class Meta: +class BootstrapSetupForm_dump(BootstrapSetupForm): + class Meta(BootstrapSetupForm.Meta): model = BootstrapSetup - exclude = ['fixture'] + exclude = ('fixture',)