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
moment Django assumes you know best, and so Django doesn't do *any*
automatic introspection of the model for that field. It simply assumes
that the field definition you've given is correct in every respect,
and that if it's somehow not correct you will fix it. So if the field
has "blank=True" in the model, but you give Django your own custom
definition for that field in the form, then Django goes with your
custom field (which, in this case, has "required=True" since that's
the default for all form fields unless you say otherwise).


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to