#34616 closed Cleanup/optimization (fixed)

Incorrect code example in 5.0 release notes

Reported by: David Smith Owned by: Christopher Cave-Ayland
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The 5.0 release notes have a code example of a form and its fields being written in Django Template Language.

However the example shows field.label being used. This would give the field's label this world be "name", in the line linked below.

Instead I believe this example should use field.label_tag which would give <label ...>name:</label>. This is closer to what the template is actually doing.

https://github.com/django/django/blob/main/docs/releases/5.0.txt#L62

https://github.com/django/django/blob/main/django/forms/templates/django/forms/field.html#L5

Change History (5)

comment:1 by Mariusz Felisiak, 18 months ago

Component: UncategorizedDocumentation
Easy pickings: set
Triage Stage: UnreviewedAccepted
Type: UncategorizedBug

comment:2 by Michael Howitz, 18 months ago

Owner: changed from nobody to Michael Howitz
Status: newassigned

comment:3 by Mariusz Felisiak, 18 months ago

Type: BugCleanup/optimization
Version: 4.2dev

comment:4 by Christopher Cave-Ayland, 18 months ago

Has patch: set
Owner: changed from Michael Howitz to Christopher Cave-Ayland

comment:5 by GitHub <noreply@…>, 18 months ago

Resolution: fixed
Status: assignedclosed

In 24d56e21:

Fixed #34616 -- Corrected label examples in 5.0 release notes.

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