ModelForm documentation not clear on default attributes of custom Fields
|Reported by:||severian||Owned by:||nobody|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The current documentation for ModelForm doesn't make clear that when you specify a custom field, default values for
required, initial, etc. will not be drawn from the underlying model, as they are when you let the ModelForm create default fields. A patch is attached that explains this.
As of this writing, the most straightforward example would involve a custom widget, but since a new paradigm for doing that is apparently about to be introduced (http://code.djangoproject.com/ticket/9223), I used an example with a custom field.
A related discussion is here: http://groups.google.com/group/django-developers/browse_thread/thread/904f0ec46525f922.
Change History (4)
Changed 6 years ago by severian
comment:1 Changed 6 years ago by Alex
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Ready for checkin