title: The If equal not working in Django Template
body: <p>I am able to fetch these two values in the Django HTML template : 
      <strong><h3> {{ user.get_username }}</h3>
      <h3> {{ post.user }} </h3></strong></p>
  
  <p>But when I use them further to compare their values in an IF condition, it doesn't work.</p>
  
  <pre><code> {%for post in post%}
                &lt;a href="{% url 'post_detail' post.id %}"&gt;&lt;h1&gt;{{post.title}}&lt;/h1&gt;&lt;/a&gt;
                &lt;h2&gt;{{post.content}}&lt;/h2&gt;
                &lt;p&gt;{{post.date}}&lt;/p&gt;
                  {%if user.is_authenticated%}
                    &lt;h3&gt; {{ user.get_username }}&lt;/h3&gt;
                    &lt;h3&gt; {{post.user}} &lt;/h3&gt;
                      {%ifequal user.get_username post.user%}
                        &lt;form action="{%url 'post_delete' post.id %}" method="POST"&gt;
                          {%csrf_token%}
                          &lt;button type="submit"&gt;Delete&lt;/button&gt;
                        &lt;/form&gt;
                      {%endifequal%}
                  {%endif%}
              {%endfor%}
  </code></pre>
  
  <p>I've also tried {% if user.get_username == post.user %} as well, but it didn't help either.</p>
  
  <p>Please help. I need the delete button only against the posts of logged in user.</p>