I have a model:
from django.db import models
CHOICES = (
(\'s\', \'Glorious spam\'),
(\'e\', \'Fabulous eggs\'),
)
class MealOrder(models.Model):
I don't think there's any built-in way to do that. A filter might do the trick, though:
@register.filter(name='display')
def display_value(bf):
"""Returns the display value of a BoundField"""
return dict(bf.field.choices).get(bf.data, '')
Then you can do:
{% for field in form %}
{{ field.label }}:
{{ field.data|display }}
{% endfor %}