In my django model, I have the following:
PRIORITY = ( (1, 'Low'), (2, 'Normal'), (3, 'High'), )
Obviously, the record associated with this stores an integer. However, in my template, I would like to show priority in a readable format. How exactly will I do it?
My template:
{% for x in items %} {{ x }} (added on {{ x.create_date }})<br> {% endfor %}
{{ x.id }} will be the priority identifier.
Thanks in advance.
user245320
source share