title: Django template: condition check with previous object
body: <p>I need check the condition with previous object in loop.</p>
  
  <p>(previous_object) is for illustration only.</p>
  
  <pre><code>{% for object in objects %}
  
  {% if (previous_object).clicks == 0 %} #this reference must be based on the loop's previous object.
  
  &lt;button type="submit"&gt; OK &lt;/button&gt;
  
  {% endif %}
  
  {% endfor %}
  </code></pre>
  
  <p>Does anyone have any ideas? 
  Thanks!</p>