Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#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 karyon)

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 karyon, 8 years ago

Description: modified (diff)

comment:2 by Tim Graham, 8 years ago

Summary: Rendering "required" as HTML attribute is not documentedRendering "required" as HTML attribute is not documented under Field.required
Triage Stage: UnreviewedAccepted

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.

comment:3 by Zbigniew Siciarz, 8 years ago

Owner: changed from nobody to Zbigniew Siciarz
Status: newassigned

comment:4 by Zbigniew Siciarz, 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 Zbigniew Siciarz, 8 years ago

Has patch: set

comment:6 by Josh Harwood, 8 years ago

Triage Stage: AcceptedReady for checkin

comment:7 by Tim Graham, 8 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:8 by Tim Graham, 8 years ago

Component: FormsDocumentation

comment:9 by Claude Paroz, 8 years ago

Patch needs improvement: unset

New PR.

comment:10 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 611ef42:

Fixed #27387 -- Doc'd required HTML attribute in Field.required docs.

comment:11 by Tim Graham <timograham@…>, 8 years ago

In f3af0acb:

[1.10.x] Fixed #27387 -- Doc'd required HTML attribute in Field.required docs.

Backport of 611ef422b173b450b1fc6f7f94eb262961b24e54 from master

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