I want to loop over my model's query set in the Django template. I can do it simply using Django for loop
but I can not do it for steps more than 1,Here is my code
{% for map in maps %}
{% if forloop.counter|divisibleby:2 %}
#Here I can access Maps with index of 1,3,5 and ..
#How can I access map with index 2,4,6 here at the same time sth like Map[forloop.counter+1]
{% endif %}
{% endfor %}
In fact I want a way to acces Map[forloop.counter+1]
in my template but I have no idea how to do that