Previously, get_FIELD_display(), for a blank or unknown value of
FIELD, return the value unchanged, e.g. say None or an empty string.

After the change, it returns the automatically inserted blank choice
(-------). This is due to it now using field.flatchoices, which is
dynamically generated through the get_choices() method, whereas it
previously just used field.choices, which contains the unmodified
tuple the field receives through __init__.
This may also be an unwanted discrepancy between the two attributes.

Was it a conscious change? I think I did sort of prefer the old
behaviour. I'm using get_field_display in a generic scenario that
makes it hard to check the original value.

Michael
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to