I have this code
{% for o in some_list %}
Now I want to do some stuff if I am on an even line. How can I do that?
{% for post in posts %} {% if loop.index is divisibleby 2 %} Even posts {% else %} Odd posts {% endif %} {% endfor %}
http://mitsuhiko.pocoo.org/jinja2docs/html/templates.html#id3