#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)
Change History (10)
by , 14 years ago
Attachment: | choice-tuple.diff added |
---|
comment:1 by , 14 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:2 by , 14 years ago
Triage Stage: | Design decision needed → Accepted |
---|
comment:3 by , 14 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
comment:4 by , 14 years ago
Patch needs improvement: | set |
---|---|
Triage Stage: | Ready for checkin → Accepted |
comment:5 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 14 years ago
comment:7 by , 14 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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 , 14 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
comment:9 by , 14 years ago
Note:
See TracTickets
for help on using tickets.
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.