Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

for loop django template count

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

    # do your stuff
{% endfor %}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #loop #django #template #count
ADD COMMENT
Topic
Name
4+3 =