Not able to access index in for loop.
lagahrajan opened this issue · 2 comments
lagahrajan commented
Tried
{% for item in items%}
{{index}}
{{@index}}
{{loop.index}}
{{forloop.index}}
{% endfor %}
None of above seems to work. What is the right way?
yogthos commented
I think you want to use forloop.counter
here.
lagahrajan commented
@yogthos Thankyou 👍