Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14307 closed (fixed)

Document form ChoiceField tuple

Reported by: Adam Vandenberg Owned by: nobody
Component: Documentation Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Mention that the 2-tuples are (value, display), same as choices in models.

Attachments (1)

choice-tuple.diff (599 bytes ) - added by Adam Vandenberg 14 years ago.

Download all attachments as: .zip

Change History (10)

by Adam Vandenberg, 14 years ago

Attachment: choice-tuple.diff added

comment:1 by asenchi, 14 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Jannis Leidel, 14 years ago

Triage Stage: Design decision neededAccepted

comment:3 by anonymous, 14 years ago

Triage Stage: AcceptedReady for checkin

comment:4 by Russell Keith-Magee, 14 years ago

Patch needs improvement: set
Triage Stage: Ready for checkinAccepted

This is a good start, but isn't quite right. ChoicesField.choices isn't require to just be tuples; it can also be a nested structure. The documentation for the model Field.choices details this; it would be better to reference the model docs for a full description of what is possible.

Interestingly, the documentation *did* include such a reference when the nested groups feature was introduced in [7996]; it must have been lost in a refactor along the way.

comment:5 by Gabriel Hurley, 14 years ago

Resolution: fixed
Status: newclosed

(In [14231]) Fixed #14307 -- Linked ChoiceField.choices docs to Field.choices docs to explain the formatting options available. Thanks to adamv for the report and Russ for the suggested fix.

comment:6 by Gabriel Hurley, 14 years ago

(In [14232]) [1.2.X] Fixed #14307 -- Linked ChoiceField.choices docs to Field.choices docs to explain the formatting options available. Thanks to adamv for the report and Russ for the suggested fix.

Backport of [14231] from trunk.

comment:7 by Adam Vandenberg, 14 years ago

Resolution: fixed
Status: closedreopened

I am not an expert in reST or Sphinx by any means, but the link appears to be linking wrong, going form here: http://docs.djangoproject.com/en/dev/ref/forms/fields/#choicefield to here: http://docs.djangoproject.com/en/dev/ref/forms/models/fields/#choices instead of here: http://docs.djangoproject.com/en/dev/ref/models/fields/#choices

comment:8 by Gabriel Hurley, 14 years ago

Resolution: fixed
Status: reopenedclosed

(In [14234]) Fixed #14307 -- Added a new crossref target to model field reference docs and fixed broken relative link in form field reference docs. Thanks to adamv for the report.

comment:9 by Gabriel Hurley, 14 years ago

(In [14235]) [1.2.X] Fixed #14307 -- Added a new crossref target to model field reference docs and fixed broken relative link in form field reference docs. Thanks to adamv for the report.

Backport of [14234] from trunk.

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