mirror of https://github.com/sgoudham/Enso-Bot.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
354 B
Python
14 lines
354 B
Python
5 years ago
|
from django.contrib.messages.api import get_messages
|
||
|
from django.contrib.messages.constants import DEFAULT_LEVELS
|
||
|
|
||
|
|
||
|
def messages(request):
|
||
|
"""
|
||
|
Return a lazy 'messages' context variable as well as
|
||
|
'DEFAULT_MESSAGE_LEVELS'.
|
||
|
"""
|
||
|
return {
|
||
|
'messages': get_messages(request),
|
||
|
'DEFAULT_MESSAGE_LEVELS': DEFAULT_LEVELS,
|
||
|
}
|