I want to traverse multiple lists within a django template in the same for loop. How do i do it?
some thinking link this:
{% for item1, item2, item3 in list1, list2 list3 %}
{{ item1 }}, {{ item2 }}, {{ item3 }}
{% endfor %}
Is something like this possible?
You have two options:
1. You define your objects so that you can access the items like parameters
Note that you have to make up the list by combining the three lists:
2. You define your own filter
See the filter documentation