#23128: _get_FIELD_display doesn't work with Field.get_choices using Iterators
-------------------------------------+-------------------------------------
Reporter: areski | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) | Resolution:
Severity: Normal | Triage Stage: Accepted
Keywords: get_choices | Needs documentation: 0
Has patch: 0 | Patch needs improvement: 0
Needs tests: 0 | UI/UX: 0
Easy pickings: 0 |
-------------------------------------+-------------------------------------
Comment (by CollinAnderson):
that's odd. it works for me.
{{{
In [2]: Address(country='CA').get_country_display()
Out[2]: u'Canada'
In [3]: Address(country='US').get_country_display()
Out[3]: u'United States'
In [4]: import django; django.get_version()
Out[4]: '1.8.dev20140805124457'
In [5]: Address._meta.get_field('country').choices
Out[5]: <itertools.tee at 0x2d978c0>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23128#comment:2>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.ad90c8a5ab184285080eece1383abd41%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.