From 3f848a800634481baec81a5eebc02c6bb20d96cf Mon Sep 17 00:00:00 2001 From: Sesostris Vieira Date: Wed, 17 Oct 2012 15:14:44 +0000 Subject: [PATCH] =?UTF-8?q?Usar=20widget=20Textarea=20no=20lugar=20de=20Te?= =?UTF-8?q?xt=20para=20campos=20Charfield=20na=20interface=20administrativ?= =?UTF-8?q?a=20dos=20diagn=C3=B3sticos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sigi/apps/diagnosticos/forms.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sigi/apps/diagnosticos/forms.py b/sigi/apps/diagnosticos/forms.py index 65f728a..c7de695 100644 --- a/sigi/apps/diagnosticos/forms.py +++ b/sigi/apps/diagnosticos/forms.py @@ -19,7 +19,13 @@ class DiagnosticoForm(BaseDynamicEntityForm): vinculando ao modelo Diagnostico """ model = Diagnostico - + + def __init__(self, *args, **kwargs): + super(DiagnosticoForm, self).__init__(*args, **kwargs) + + for k, f in self.fields.iteritems(): + if isinstance(f, CharField): + f.widget = forms.widgets.Textarea(attrs={'cols':'80'}) class DiagnosticoMobileForm(BaseDynamicEntityForm): """Classe responsável por construir o formulário