title: Check if a value is equal to the modulo of another number in a Django template
body: <p>I am trying to get an equivalent of this in Django</p>
  
  <p><code>if idx % 3 == 2:</code> do something</p>
  
  <p>idx is an index in a forloop but I have simplified the code</p>
  
  <p>I used this:</p>
  
  <pre><code>{% ifequal idx|divisibleby:3 2 %}
      do something
  {% endifequal %}
  </code></pre>
  
  <p>It seems like the <code>divisibleby</code> filter returns <code>True</code> so it is almost impossible to compare the number 2 after getting its modulo.</p>