Loop through a dictionary
- Answer
{% for key, value in data.items %}
{{ key }}: {{ value }}
{% endfor %}
This question is one of 13 in Django template tags and filters. Test yourself on all of them.
Practice quiz FlashcardsLog in to add an explanation.
Advertisement