Opened 19 years ago
Closed 19 years ago
#1160 closed enhancement (invalid)
Add get_<choicesfield>_display() to the docs
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
See http://www.djangoproject.com/documentation/db_api/#get-foo-display