~ubuntu-branches/debian/sid/python-django/sid

« back to all changes in this revision

Viewing changes to django/contrib/messages/context_processors.py

  • Committer: Package Import Robot
  • Author(s): Raphaël Hertzog
  • Date: 2014-09-17 14:15:11 UTC
  • mfrom: (1.3.17) (6.2.18 experimental)
  • Revision ID: package-import@ubuntu.com-20140917141511-icneokthe9ww5sk4
Tags: 1.7-2
* Release to unstable.
* Add a migrate-south sample script to help users apply their South
  migrations. Thanks to Brian May.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from django.contrib.messages.api import get_messages
 
2
from django.contrib.messages.constants import DEFAULT_LEVELS
2
3
 
3
4
 
4
5
def messages(request):
5
6
    """
6
7
    Returns a lazy 'messages' context variable.
7
8
    """
8
 
    return {'messages': get_messages(request)}
 
9
    return {
 
10
        'messages': get_messages(request),
 
11
        'DEFAULT_MESSAGE_LEVELS': DEFAULT_LEVELS,
 
12
    }