Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#11740 closed (fixed)

ModelForm documentation not clear on default attributes of custom Fields

Reported by: severian Owned by: nobody
Component: Documentation Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Attachments (1)

modelforms_patch.diff (1.6 KB ) - added by severian 15 years ago.
Documentation patch

Download all attachments as: .zip

Change History (4)

by severian, 15 years ago

Attachment: modelforms_patch.diff added

Documentation patch

comment:1 by Alex Gaynor, 15 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [11548]) Fixed #11740 -- Added extra detail on the behavior of ModelForms. Thanks to severian for the suggestion.

comment:3 by Russell Keith-Magee, 15 years ago

(In [11570]) [1.1.X] Fixed #11740 -- Added extra detail on the behavior of ModelForms. Thanks to severian for the suggestion.

Merge of r11548 from trunk.

Note: See TracTickets for help on using tickets.
Back to Top