Opened 3 years ago
Closed 3 years ago
#33186 closed New feature (invalid)
Clarify get_FOO_display returns name, not label, from models.Choices
Reported by: | Andrew Chen Wang | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | docs, choices |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I think it would be nice if the docs explicitly mentioned that get_FOO_display returns name, not the label if you were to use models.IntegerChoices or models.TextChoices.
Change History (1)
comment:1 by , 3 years ago
Easy pickings: | unset |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
As far as I'm aware
get_FOO_display()
returns labels as expected: