#11674 closed Cleanup/optimization (fixed)
documentation clarifications on ModelForms & ModelFormsets Meta fields
Reported by: | 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)
Change History (14)
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
Keywords: | easy-pickings added |
---|---|
Severity: | → Normal |
Type: | → Cleanup/optimization |
comment:3 by , 14 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 14 years ago
Easy pickings: | set |
---|
comment:5 by , 13 years ago
UI/UX: | unset |
---|
comment:6 by , 13 years ago
Has patch: | set |
---|
I have attached a diff with the (I hope) requested changes.
comment:7 by , 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 , 13 years ago
Triage Stage: | Accepted → Ready 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 , 13 years ago
Triage Stage: | Accepted → Ready 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 , 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 , 13 years ago
Oh gosh, sorry for the spam :( The comment form didn't appear to be submitting properly
comment:10 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixed this in r16875. Thanks for the patch!
DjangoCon Europe 2011 sprint: commenced work on this ticket