#3455: Documentation for "choices" should mention "get_FOO_display" ------------------------+--------------------------------------------------- Reporter: ubernostrum | Owner: jacob Status: new | Component: Documentation Version: SVN | Keywords: choices get_FOO_display Stage: Unreviewed | Has_patch: 0 ------------------------+--------------------------------------------------- The documentation for the `choices` attribute on model fields mentions that `choices` should be a tuple of 2-tuples, including an actual value and a human-readable name, but documentation on how to retrieve the human- readable name of the selected choice from an instance of the model lives elsewhere, in the database API documentation, under the unintuitive name of `get_FOO_display`. This hinders a new user of Django trying to understand how best to make use of `choices`. At the very least, the model documentation should include, under `choices`, a link to the `get_FOO_display` entry in the DB documentation for an explanation of how to get the human-readable name back out of a model instance. Ideally, we'd do that and come up with better titles for the sections on the various `get_FOO_display`/`get_next_by_FOO`/etc. methods.
-- Ticket URL: <http://code.djangoproject.com/ticket/3455> Django Code <http://code.djangoproject.com/> The web framework for perfectionists with deadlines --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
