[Django]-Showing auth_message's

1👍

Auth messages are deprecated.

Make sure you have django.contrib.messages.context_processors.messages context processor set in your setting.py. Then you can just use messages variable in your templates.

{% if messages %}
    <ul class="messagelist">
        {% for message in messages %}
            <li>{{ message }}</li>
        {% endfor %}
    </ul>
{% endif %}

Leave a comment