1loop.index The current iteration of the loop. (1 indexed)
2loop.index0 The current iteration of the loop. (0 indexed)
3loop.revindex The number of iterations from the end of the loop (1 indexed)
4loop.revindex0 The number of iterations from the end of the loop (0 indexed)
5loop.first True if first iteration
6loop.last True if last iteration
7loop.length The number of items in the sequence
8loop.parent The parent context
9
10{% for user in users %}
11 {{ loop.index }} - {{ user.username }}
12{% endfor %}
1{% for key, user in users %}
2 <li>{{ key }}: {{ user.username }}</li>
3{% endfor %}
1{% for key, user in users %}
2 <li>{{ key }}: {{ user.username|e }}</li>
3{% endfor %}