Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#11674 closed Cleanup/optimization (fixed)

documentation clarifications on ModelForms & ModelFormsets Meta fields

Reported by: david.h.haas@… Owned by: Raúl Cumplido
Component: Documentation Version: dev
Severity: Normal Keywords: ModelForm, Meta class, easy-pickings
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Based on discussion from this thread:

http://groups.google.com/group/django-users/browse_thread/thread/19a8b01d87819119/217ac9ecee6f474f

the documentation of the fields attribute of a ModelForms inner Meta class should be clarified/expanded. Basically, add a sentence that states if you define fields (or excludes) on an inner Meta class, any excluded field 1) will not appear on the form by default, 2) will not be initialized from a model instance if manually added back to the form, and 3) will not be set by the form's save method. A similar caveat should be added to the ModelFormset documentation.

In the current documentation:

http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a-subset-of-fields-on-the-form

Points 1 & 3 are mentioned, but 2 is not.

Attachments (1)

11674.diff (2.1 KB ) - added by Pieter Swinkels 13 years ago.
changes to the documentation

Download all attachments as: .zip

Change History (14)

comment:1 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedAccepted

comment:2 by Julien Phalip, 13 years ago

Keywords: easy-pickings added
Severity: Normal
Type: Cleanup/optimization

comment:3 by Raúl Cumplido, 13 years ago

Owner: changed from nobody to Raúl Cumplido
Status: newassigned

comment:4 by Jacob, 13 years ago

Easy pickings: set

comment:5 by Pieter Swinkels, 13 years ago

UI/UX: unset

DjangoCon Europe 2011 sprint: commenced work on this ticket

by Pieter Swinkels, 13 years ago

Attachment: 11674.diff added

changes to the documentation

comment:6 by Pieter Swinkels, 13 years ago

Has patch: set

I have attached a diff with the (I hope) requested changes.

comment:7 by Marc Egli, 13 years ago

the changes are undersandable but not de cleanest english. but if no one refactors the text it should be included like that. I also tested the patch if it breaks docs compilation and it doesn't.

comment:8 by evanlec@…, 13 years ago

Triage Stage: AcceptedReady for checkin

I think the attached diff has quite clean English. I looked over it myself (I'm a native English speaker, College graduate) and I couldn't think of a way to put it any better. I say this patch is ready to go!

comment:8 by evanlec@…, 13 years ago

Triage Stage: AcceptedReady for checkin

I think the attached diff has quite clean English. I looked over it myself (I'm a native English speaker, College graduate) and I couldn't think of a way to put it any better. I say this patch is ready to go!

comment:8 by evanlec@…, 13 years ago

I think the attached diff has quite clean English. I looked over it myself (I'm a native English speaker, College graduate) and I couldn't think of a way to put it any better. I say this patch is ready to go!

comment:9 by anonymous, 13 years ago

Oh gosh, sorry for the spam :( The comment form didn't appear to be submitting properly

comment:10 by Paul McMillan, 12 years ago

Resolution: fixed
Status: assignedclosed

Fixed this in r16875. Thanks for the patch!

comment:11 by Paul McMillan, 12 years ago

In [16881]:

[1.3.X] Fixed #11674 -- Clarified docs on excluded fields of ModelForms. Thanks PieterSwinkels for the patch.

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