Hi guys,
I have the following in my django model:
PRIORITY = (
(1, 'Low'),
(2, 'Normal'),
(3, 'High'),
)
Obviously the entry associated with this is storing the integer. In my template however I would like to show the priority in human-readable format. How exactly do I accomplish this?
My template:
{% for x in items %}
{{ x }} (added on {{ x.create_date }})<br>
{% endfor %}
{{ x.id }}
would be the priority ID.
Thanks in advance.