1👍
Pass choices to the template, unpack and display them:
views.py
context["genders"] = Order.Gender.choices
template.html
{% for key, gender in genders %}
<p>{{ gender }}</p>
{% endfor %}
Source:stackexchange.com
1👍
Pass choices to the template, unpack and display them:
views.py
context["genders"] = Order.Gender.choices
template.html
{% for key, gender in genders %}
<p>{{ gender }}</p>
{% endfor %}