Hi
This is taken directly from my Django template:
{% for day in days %}
<!-- {% cycle 'day' 'day' 'day last' as cls %} -->
{% rounded "black" cls %} {# Custom tag giving me rounded borders. #}
...
{% endrounded %}
{% endfor %}
I have commented out the {% cycle %}
because I only use it to set "cls
" to "day last
" every third iteration in the loop. Is there any better way to do this without adding any code to the view? (People say that logic should stay out of templates, but having it the other way around is almost worse.)