#27387 closed Cleanup/optimization (fixed)
Rendering "required" as HTML attribute is not documented under Field.required
Reported by: | karyon | Owned by: | Zbigniew Siciarz |
---|---|---|---|
Component: | Documentation | Version: | 1.10 |
Severity: | Normal | Keywords: | |
Cc: | karyon | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
https://docs.djangoproject.com/en/1.10/releases/1.10/#forms says
Required form fields now have the required HTML attribute. Set the new Form.use_required_attribute attribute to False to disable it. The required attribute isn’t included on forms of formsets because the browser validation may not be correct when adding and deleting formsets.
i would expect all of that (it's rendered, can be disabled, isn't rendered in formsets) to appear somewhere around https://docs.djangoproject.com/el/1.10/ref/forms/fields/#required, but it does not.
ref https://code.djangoproject.com/ticket/27299. I guess this per-widget option should rather not be mentioned in the field documentation...?
Change History (11)
comment:1 by , 8 years ago
Description: | modified (diff) |
---|
comment:2 by , 8 years ago
Summary: | Rendering "required" as HTML attribute is not documented → Rendering "required" as HTML attribute is not documented under Field.required |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:3 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:4 by , 8 years ago
It makes sense to me to add a versionadded
note and refer to 1.10 release notes for details. I've created a PR here: https://github.com/django/django/pull/7485
comment:5 by , 8 years ago
Has patch: | set |
---|
comment:6 by , 8 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:7 by , 8 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Ready for checkin → Accepted |
comment:8 by , 8 years ago
Component: | Forms → Documentation |
---|
See ec6121693f112ae33b653b4364e812722d2eb567 for the change and all places the documentation was updated. I guess it's a matter of judgment how many times to repeat certain things and to add links as appropriate.