#35831 closed Cleanup/optimization (fixed)
Include ModelForm and its Meta options in reference docs
Reported by: | jernwerber | Owned by: | Mustafa Pirbhai |
---|---|---|---|
Component: | Documentation | Version: | |
Severity: | Normal | 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
ModelForm and the use and structure of a Meta inner class to control what it outputs is covered mostly by way of a topic, Creating Forms from Models.
As a developer, it would be helpful to be able to have a consolidated reference for the complete set of possible Meta options (ModelFormOptions) that can be used with a ModelForm's Meta class in a single place, rather than having to infer options from other topics or check the Python source.
Change History (17)
comment:1 by , 12 months ago
Owner: | set to |
---|---|
Status: | new → assigned |
follow-up: 4 comment:2 by , 11 months ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 11 months ago
Summary: | Reference page for ModelForm Meta and ModelFormOptions → Include ModelForm and its Meta options in reference docs |
---|
comment:4 by , 11 months ago
Yep, that makes sense. I've structured by going through the possible/valid attributes for ModelFormOptions
and detailing what each would accept/expect and the kinds of errors one might expect to see if something goes wrong.
I wasn't sure where to situate it in the docs since "models.txt" is already taken by the modelform_factory
and modelformset_factory
docs so for now I just put it under its own thing.
I've done a first pass, here: https://github.com/jernwerber/django/blob/docs-modelform-meta/docs/ref/forms/modelform-meta.txt, but before doing some of the formatting (like breaking lines at 80 characters) and making a PR, is there a (non-PR) workflow for this to be reviewed?
EDIT: I've instead submitted this as a draft PR (see comment below).
Replying to Clifford Gama:
Hi @jernwerber, and thanks for taking the time to create this ticket.
I agree. The reference for
ModelForm
and theMeta
options should be here. Although I'm not sure how much we should include there given most of the information is covered in the topic. I think we should start with the signatures, descriptions and the list of Meta options along with what they do.
comment:5 by , 11 months ago
Has patch: | set |
---|
I have created a draft PR for these changes: PR
Note: There is still a make
warning because I have not added this to any toctrees. Not sure where it should go since the most relevant location is already taken by another ModelForms topic-- I wasn't sure if I could make the call to move things around.
comment:6 by , 11 months ago
Patch needs improvement: | set |
---|
comment:7 by , 11 months ago
Patch needs improvement: | unset |
---|
comment:8 by , 9 months ago
Patch needs improvement: | set |
---|
comment:9 by , 4 weeks ago
Patch needs improvement: | unset |
---|
follow-up: 11 comment:10 by , 4 weeks ago
Hello, just a first attempt at picking up something that needs to be finalized. If on the right track I'll change it over to me.
comment:11 by , 4 weeks ago
Patch needs improvement: | set |
---|
Replying to Mustafa Pirbhai:
Hello, just a first attempt at picking up something that needs to be finalized. If on the right track I'll change it over to me. PR
It's an the right track, feel free to assign yourself and uncheck patch needs improvement once comments have been addressed
comment:12 by , 4 weeks ago
Owner: | changed from | to
---|
comment:13 by , 4 weeks ago
Owner: | removed |
---|---|
Patch needs improvement: | unset |
comment:14 by , 4 weeks ago
Owner: | set to |
---|
comment:15 by , 4 weeks ago
Triage Stage: | Accepted → Ready for checkin |
---|
Hi @jernwerber, and thanks for taking the time to create this ticket.
I agree. The reference for
ModelForm
and theMeta
options should be here. Although I'm not sure how much we should include there given most of the information is covered in the topic. I think we should start with the signatures, descriptions and the list of Meta options along with what they do.