title: Django template compare two variables not working
body: <p>I am building a pagination with Django and Bootstrap. There is this variable pageNum which is passed from my views.py and indicates the current page. I use a for loop to generate the pagination. The pagination itself is fine but when I compare forloop.counter to pageNum to add the class="active" to the current li its not working. But when I actually print the values of pageNum and forloop.counter they are identical. Here is the code:</p>
  
  <pre><code> &lt;ul class="pagination"&gt;
   {% for pagination in paginationInfo %}
        &lt;li {% if forloop.counter == pageNum %} class="active" {%endif%} &gt;&lt;a href="{{pagination}}"&gt;{{forloop.counter}}&lt;/a&gt;&lt;/li&gt;
   {% endfor %}
   &lt;/ul&gt;
  </code></pre>