Re: ModelForm removing blank=True

2008-12-09 Thread tenni
Brilliant. Thanks James. I went down this path of thinking but tried blank=True instead of required=False which, when it failed, confused my underslept mind :) Appreciate it. Andrew. On Dec 10, 1:03 pm, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Tue, Dec 9, 2008 at 7:50 PM, tenni <[EMAIL

Re: ModelForm removing blank=True

2008-12-09 Thread James Bennett
On Tue, Dec 9, 2008 at 7:50 PM, tenni <[EMAIL PROTECTED]> wrote: > "optional_field" becomes a required field in the Admin. I assume > something is overriding the model's blank=True for this field. Yes. *You* are overriding that. The moment you override a field's definition in a ModelForm is the

ModelForm removing blank=True

2008-12-09 Thread tenni
If I do this in admin.py class UnitAdminModelForm(forms.ModelForm): optional_field = forms.CharField(widget=WYMEditor()) class Meta: model = Unit "optional_field" becomes a required field in the Admin. I assume something is overriding the model's blank=True for this field. If i