Opened 7 years ago

Closed 5 years ago

Last modified 5 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: master
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 6 years ago.
changes to the documentation

Download all attachments as: .zip

Change History (14)

comment:1 Changed 7 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

comment:2 Changed 6 years ago by Julien Phalip

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

comment:3 Changed 6 years ago by Raúl Cumplido

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

comment:4 Changed 6 years ago by Jacob

Easy pickings: set

comment:5 Changed 6 years ago by Pieter Swinkels

UI/UX: unset

DjangoCon Europe 2011 sprint: commenced work on this ticket

Changed 6 years ago by Pieter Swinkels

Attachment: 11674.diff added

changes to the documentation

comment:6 Changed 6 years ago by Pieter Swinkels

Has patch: set

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

comment:7 Changed 6 years ago by Marc Egli

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 Changed 5 years ago by evanlec@…

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 Changed 5 years ago by evanlec@…

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 Changed 5 years ago by evanlec@…

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 Changed 5 years ago by anonymous

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

comment:10 Changed 5 years ago by Paul McMillan

Resolution: fixed
Status: assignedclosed

Fixed this in r16875. Thanks for the patch!

comment:11 Changed 5 years ago by Paul McMillan

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