I have a dictionary
data = {\'sok\': [ [1, 10] ], \'sao\': [ [1, 10] ],\'sok&sao\':[ [2,20]] }
How Can I (Loop trough Dictionary ) pres
Unfortunately, django templates do not deal with Python tuples. So it is not legal to use "for author, values" in the template. Instead, you must access tuple or array values by their index by using ".index", as in "tuple.0" and "tuple.1".
author
qty
Amount
{% for entry in data.items %}
{{entry.0}}
{% for v in entry.1 %}
{{v}}
{% endfor %}
{% endfor %}