Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

counter in django template

{{ forloop.counter }}   ->  The current iteration of the loop (1-indexed)
{{ forloop.counter0 }}  ->  The current iteration of the loop (0-indexed)
Source by docs.djangoproject.com #
 
PREVIOUS NEXT
Tagged: #counter #django #template
ADD COMMENT
Topic
Name
1+8 =