Re: Meta.widgets in ModelForm seems... ignored

2010-01-27 Thread Massimiliano della Rovere
Thanks foy your replies. The class Fondo has in truth lots of Textfield to be displayed as CharField (I am using django.forms to implement a search mask); the one posted was only an excerpt. I solved this way: class FondoForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(FondoForm,

Re: Meta.widgets in ModelForm seems... ignored

2010-01-26 Thread KrcK ---
You can try this: class Fondo(models.Model): denominazione = models.CharField(max_length=200) storia= models.TextField(blank=True) class FondoForm(forms.ModelForm): storia = forms.CharField(widget=forms.Textarea) class Meta: model = Fondo I am not sure if this works.

Re: Meta.widgets in ModelForm seems... ignored

2010-01-26 Thread Daniel Roseman
On Jan 26, 11:45 am, Massimiliano della Rovere wrote: > I use django 1.1.1 and I defined: > > class Fondo(models.Model): > denominazione = models.CharField(max_length=200) >  storia        = models.TextField(blank=True) > > class FondoForm(forms.ModelForm): >  

Meta.widgets in ModelForm seems... ignored

2010-01-26 Thread Massimiliano della Rovere
I use django 1.1.1 and I defined: class Fondo(models.Model): denominazione = models.CharField(max_length=200) storia= models.TextField(blank=True) class FondoForm(forms.ModelForm): class Meta: model = Fondo widgets = {'storia': forms.TextInput} but the 'storia' field is still shown