title: Django message template tag checking
body: <p>I want to check whether the <a href="https://docs.djangoproject.com/en/dev/ref/contrib/messages/#message-tags" rel="noreferrer">message tag</a> are INFO ?</p>
  
  <p>How to check that in the template file?</p>
  
  <p>I tried this but it didn't work:</p>
  
  <pre><code>{% if messages %}
      &lt;ul&gt;
          {% for message in messages %}
              &lt;li&gt;
                  {% if message.tag == "INFO" %}
                      {{ message }}
                  {% endif %}
              &lt;/li&gt;
          {% endfor %}
      &lt;/ul&gt;
  {% endif %}
  </code></pre>
  
  <p>I even tried other combinations like <code>message.tag.info == "INFO"</code> etc but they didn't seem to work. What is the correct way of checking it?</p>