I am trying to increment a counter
variable to print the numbers one to six
{% set counter = 1 %}
{% for i in range(3) %}
{% for j in range(2) %}
{{ counter }}
{% set counter = counter + 1 %}
{% endfor %}
{% endfor %}
However, the counter variable is stuck at one, and my output is:
····
········1
········
····
········1
········
····
····
········1
········
····
········1
········
····
····
········1
········
····
········1
········
····
Note: I am using an online Jinja2 live parser http://jinja.quantprogramming.com/ to help run this code.