I have an template:
{% if c == 2 %}
{% for time in a %}
code(1)
{% endfor %}
{% else %}
{% for time in b %}
repeat of code(1)
{% endfor %}
{% endif %}
As you can see this code has an repeating part. I want to refactor like this:
{% if c == 2 %}
var = a
{% else %}
var = b
{% endif %}
{% for time in var %}
code(1)
{% endfor %}
How to do this?