Mapping auth_message's

After setting django_message, I noticed that django has a small small notification system (Genesis: Auth_message). I was wondering how can I show them to users? They are displayed only in the admin panel.

What template tag can I use to integrate them into the site? How to add notifications?

+4
source share
1 answer

Auth messages are out of date.

Make sure that <context processor django.contrib.messages.context_processors.messages installed in your settings file. Then you can simply use the messages variable in your templates.

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

All Articles