Opened 19 years ago

Closed 19 years ago

Last modified 18 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

Description

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@… 19 years ago.
patch

Download all attachments as: .zip

Change History (4)

by robert@…, 19 years ago

patch

comment:1 by Adrian Holovaty, 19 years ago

Status: newassigned

comment:2 by Adrian Holovaty, 19 years ago

Only thing holding us back at this point is the name of the accessor method. See http://groups.google.com/group/django-developers/browse_thread/thread/4842f1d47aacfcdc/68622b20ecfd2e49 for discussion.

comment:3 by Adrian Holovaty, 19 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