Hi,

I have a model with an integer field that uses choices for display
names:

class Task(models.Model):
    PRIORITY_CHOICES = (
        ('0', 'Low'),
        ('1', 'Normal'),
        ('2', 'High')
    )
    priority = models.IntegerField(choices=PRIORITY_CHOICES)

In my view, I'm grouping the data on the priority:

{% regroup feature.task_set.all|dictsortreversed:"priority" by priority
as grouped %}
{% for group in grouped %}
  <h2>{{ group.grouper }}</h2>

However, when I do this, group.grouper expands to "0" or "2", not "Low"
or High".  How can I get the display name for this field?

Thanks,
Ross


--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to