How to make a for loop in Jinja?

promo picture promo · Apr 17, 2015 · Viewed 53.2k times · Source

I want to make a for-loop that goes from 0 to 10 in Jinja.

How do I do it?
All I know to do is the advanced for, but this does not help me now.

Answer

Andrew Kloos picture Andrew Kloos · Apr 17, 2015

do something like this...

{% for i in range(11) %}
 {{ i }}
{% endfor %}

Edited the endfor.

Hope this helps!