1👍
✅
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 %}
Source:stackexchange.com