apollo13 pointed this out on the IRC channel:
If your choices use an integers, get_foo_display returns the integer
and not the "human readable" option.
For example, reworking this from the docs:
YEAR_IN_SCHOOL_CHOICES = (
(1, 'Freshman'),
(2, 'Sophomore'),
(3, 'Junior'),
(4, 'Senior'),
(5, 'Graduate'),
)
get_foo_display would show 1 instead of "Freshman". The select widget
works right either way.
Is this expected behavior? Or should ints work?
If this is expected behavior, perhaps we need a note in the docs to
that effect (I'd be glad to open the ticket).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---