Opened 19 years ago

Closed 19 years ago

#1160 closed enhancement (invalid)

Add get_<choicesfield>_display() to the docs

Reported by: Jorge Gajon Owned by: Jacob
Component: Documentation Version:
Severity: trivial Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

I have a model with a field with "choices" set, but couldn't find how to display the human readable (second part) of the choice in a template. Until I found at the irc logs a mention that there is a "get_<whatever>_display" method to do that.

I couldn't find a reference to that method anywhere on the docs. I just wanted to mention that maybe it would be good to add it somewhere, probably right in the Model Reference page, under the choices description.

http://www.djangoproject.com/documentation/model_api/#general-field-options

Change History (1)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top