Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#468 closed enhancement (fixed)

[patch] Add accessor method to get human readable value for fields with a choice list.

Reported by: robert@… Owned by: Adrian Holovaty
Component: Metasystem Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Sometimes it is useful to access the human readable value of a field with a choices list. Currently (AFAIK) this can only be done by a manipulator.

This patch adds methods to the generated model classes to allow clients to access the human readable value.

Attachments (1)

django-choices-accessor.patch (1.2 KB ) - added by robert@… 18 years ago.

Download all attachments as: .zip

Change History (4)

by robert@…, 18 years ago


comment:1 by Adrian Holovaty, 18 years ago

Status: newassigned

comment:2 by Adrian Holovaty, 18 years ago

Only thing holding us back at this point is the name of the accessor method. See for discussion.

comment:3 by Adrian Holovaty, 18 years ago

Resolution: fixed
Status: assignedclosed

(In [687]) Fixed #468 -- Model classes now get an accessor method to get the human-readable value for each field that has 'choices' set. Thanks, Robert

Note: See TracTickets for help on using tickets.
Back to Top