I want to check whether the message tag are INFO ?
How to check that in the template file?
I tried this but it didn't work:
{% if messages %}
<ul>
{% for message in messages %}
<li>
{% if message.tag == "INFO" %}
{{ message }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
I even tried other combinations like message.tag.info == "INFO"
etc but they didn't seem to work. What is the correct way of checking it?
INFO
orSUCCESS
? – Truncation