Opened 6 years ago

Closed 6 years ago

Last modified 6 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 Changed 6 years ago by karyon

Description: modified (diff)

comment:2 Changed 6 years ago by Tim Graham

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 Changed 6 years ago by Zbigniew Siciarz

Owner: changed from nobody to Zbigniew Siciarz
Status: newassigned

comment:4 Changed 6 years ago by Zbigniew Siciarz

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 Changed 6 years ago by Zbigniew Siciarz

Has patch: set

comment:6 Changed 6 years ago by Josh Harwood

Triage Stage: AcceptedReady for checkin

comment:7 Changed 6 years ago by Tim Graham

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

comment:8 Changed 6 years ago by Tim Graham

Component: FormsDocumentation

comment:9 Changed 6 years ago by Claude Paroz

Patch needs improvement: unset

New PR.

comment:10 Changed 6 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 611ef42:

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

comment:11 Changed 6 years ago by Tim Graham <timograham@…>

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