#12331: get_display shows choices key, not value if field name contains underscore symbol ----------------------------------+----------------------------------------- Reporter: anonymous | Owner: nobody Status: new | Milestone: Component: Template system | Version: SVN Keywords: choices, get_display | Stage: Unreviewed Has_patch: 0 | ----------------------------------+----------------------------------------- {{{ CURRENCY_CHOICES = ( (u"USD", u"$"), (u"EUR", u"€"), ) buyer_currency = models.CharField(u"Price", choices = CURRENCY_CHOICES, max_length=3, default='USD')
template: {{user.userprofile.get_buyer_currency_display|safe}} shows "USD" after rebuilding model with no underscore it works as it should: {{user.userprofile.get_buyercurrency_display|safe}} shows "$" }}} -- Ticket URL: <http://code.djangoproject.com/ticket/12331> Django <http://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 post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.