Answers for "django forloop counter wha is"

3

django forloop.counter

{% for item in item_list %}
    {{ forloop.counter }} # starting index 1
    {{ forloop.counter0 }} # starting index 0

    # do your stuff
{% endfor %}
Posted by: Guest on March-19-2020

Browse Popular Code Answers by Language