views:

19

answers:

1

After installing django_message I noticed django has a nice little notification system build-in (Being: Auth_message). I was wondering how can I show them to users? They only appear in the admin panel as for now.

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

+1  A: 

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 %}
rebus
I think they are now coupled with request not User. See [Adding a message docs](http://docs.djangoproject.com/en/dev/ref/contrib/messages/#using-messages-in-views-and-templates).
rebus
Just what I needed, thanks!
Robus