]> git.openstreetmap.org Git - osqa.git/blob - forum/user_messages/context_processors.py
Configure logging "the Django way" and ensure that all messages are written to the...
[osqa.git] / forum / user_messages / context_processors.py
1 """
2 Context processor for lightweight session messages.
3
4 Time-stamp: <2008-07-19 23:16:19 carljm context_processors.py>
5
6 """
7 from django.utils.encoding import StrAndUnicode
8
9 from django.contrib.messages.api import get_messages
10
11 def user_messages (request):
12     """
13     Returns session messages for the current session.
14
15     """
16     return { 'user_messages': get_messages(request) }