Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#24956 closed Bug (fixed)

Syntax Incorrect for Example of empty_label in SelectDateWidget Documentation

Reported by: Ben Waters Owned by: nobody
Component: Documentation Version: 1.8
Severity: Normal Keywords: documentation, syntax
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Under empty_label on https://docs.djangoproject.com/en/1.8/ref/forms/widgets/#selectdatewidget

There is the following code snippet as an example of using empty_label

# A custom empty label with tuple
field1 = forms.DateField(widget=SelectDateWidget(
    empty_label=("Choose Year", "Choose Month", "Choose Day"))

This is syntactically invalid and should include another closing parenthesis and look as the following

# A custom empty label with tuple
field1 = forms.DateField(widget=SelectDateWidget(
    empty_label=("Choose Year", "Choose Month", "Choose Day")))

Change History (2)

comment:1 by Tim Graham <timograham@…>, 9 years ago

Resolution: fixed
Status: newclosed

In 9f825b9e:

Fixed #24956 -- Fixed typo in docs/ref/forms/widgets.txt

comment:2 by Tim Graham <timograham@…>, 9 years ago

In 9cf5c4dc:

[1.8.x] Fixed #24956 -- Fixed typo in docs/ref/forms/widgets.txt

Backport of 9f825b9e28547b1310526c9be9fca9e6dbcd57e7 from master

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