From 7951f125e77f67d70e58a31436eee46abdb8bf44 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Tue, 6 May 2014 20:37:48 +0200 Subject: [PATCH] Updated the messages context processor docs Refs #20610. --- docs/ref/templates/api.txt | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/ref/templates/api.txt b/docs/ref/templates/api.txt index 08c86d99fc8..d07c65d9f2b 100644 --- a/docs/ref/templates/api.txt +++ b/docs/ref/templates/api.txt @@ -575,11 +575,16 @@ django.contrib.messages.context_processors.messages ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If :setting:`TEMPLATE_CONTEXT_PROCESSORS` contains this processor, every -``RequestContext`` will contain a single additional variable: +``RequestContext`` will contain these two variables: * ``messages`` -- A list of messages (as strings) that have been set - via the user model (using ``user.message_set.create``) or through - the :doc:`messages framework `. + via the :doc:`messages framework `. +* ``DEFAULT_MESSAGE_LEVELS`` -- A mapping of the message level names to + :ref:`their numeric value `. + +.. versionchanged:: 1.7 + + The ``DEFAULT_MESSAGE_LEVELS`` variable was added. Writing your own context processors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~