I want to be able to output the current loop iteration to my template.
According to the docs: http://wsgiarea.pocoo.org/jinja/docs/loops.html, there is a loop.count
change this {% if loop.counter == 1 %} to {% if forloop.counter == 1 %} {#your code here#} {%endfor%}
{% if loop.counter == 1 %}
{% if forloop.counter == 1 %} {#your code here#} {%endfor%}
and this from {{ user }} {{loop.counter}} to {{ user }} {{forloop.counter}}
{{ user }} {{loop.counter}}
{{ user }} {{forloop.counter}}