from django.contrib.messages.constants import DEFAULT_LEVELS

from user_messages.api import get_messages


def messages(request):
    """
    Return a lazy 'messages' context variable as well as
    'DEFAULT_MESSAGE_LEVELS'.
    """
    return {
        "messages": get_messages(request=request),
        "DEFAULT_MESSAGE_LEVELS": DEFAULT_LEVELS,
    }

[((12, 20, 12, 49), 'user_messages.api.get_messages', 'get_messages', (), '', False, 'from user_messages.api import get_messages\n')]