Skip to content

Commit

Permalink
[1.7.x] Updated the messages context processor docs
Browse files Browse the repository at this point in the history
Refs #20610.
Backport of 7951f12 frmo master.
  • Loading branch information
claudep committed May 6, 2014
1 parent 0d138b9 commit 79e4a18
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/ref/templates/api.txt
Expand Up @@ -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 </ref/contrib/messages>`.
via the :doc:`messages framework </ref/contrib/messages>`.
* ``DEFAULT_MESSAGE_LEVELS`` -- A mapping of the message level names to
:ref:`their numeric value <message-level-constants>`.

.. versionchanged:: 1.7

The ``DEFAULT_MESSAGE_LEVELS`` variable was added.

Writing your own context processors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down

0 comments on commit 79e4a18

Please sign in to comment.