title: Django: Problem with {% cycle %}
body: <p>This is taken directly from my Django template:</p>
  
  <pre><code>{% for day in days %}
    &lt;!-- {% cycle 'day' 'day' 'day last' as cls %} --&gt;
    {% rounded "black" cls %} {# Custom tag giving me rounded borders. #}
    ...
    {% endrounded %}
  {% endfor %}
  </code></pre>
  
  <p>I have commented out the <code>{% cycle %}</code> because I only use it to set "<code>cls</code>" to "<code>day last</code>" 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.)</p>