Fixed #2610 -- Clarified docs on 'messages' variable for auth context processor
git-svn-id: http://code.djangoproject.com/svn/django/trunk@3685 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
401b15d853
commit
5e69536f7c
|
@ -301,11 +301,13 @@ If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every
|
||||||
logged-in user (or an ``AnonymousUser`` instance, if the client isn't
|
logged-in user (or an ``AnonymousUser`` instance, if the client isn't
|
||||||
logged in). See the `user authentication docs`.
|
logged in). See the `user authentication docs`.
|
||||||
|
|
||||||
* ``messages`` -- Returns a list of messages for the currently logged-in
|
* ``messages`` -- A list of messages (as strings) for the currently
|
||||||
user (set with ``user.add_message()``). Behind the scenes, this calls
|
logged-in user. Behind the scenes, this calls
|
||||||
``request.user.get_and_delete_messages()``, which iterates over user's
|
``request.user.get_and_delete_messages()`` for every request. That method
|
||||||
messages and returns the actual message before deleting the ``Message``
|
collects the user's messages and deletes them from the database.
|
||||||
object.
|
|
||||||
|
Note that messages are set with ``user.add_message()``. See the
|
||||||
|
`message docs`_ for more.
|
||||||
|
|
||||||
* ``perms`` -- An instance of
|
* ``perms`` -- An instance of
|
||||||
``django.core.context_processors.PermWrapper``, representing the
|
``django.core.context_processors.PermWrapper``, representing the
|
||||||
|
@ -313,6 +315,7 @@ If ``TEMPLATE_CONTEXT_PROCESSORS`` contains this processor, every
|
||||||
docs`_.
|
docs`_.
|
||||||
|
|
||||||
.. _user authentication docs: http://www.djangoproject.com/documentation/authentication/#users
|
.. _user authentication docs: http://www.djangoproject.com/documentation/authentication/#users
|
||||||
|
.. _message docs: http://www.djangoproject.com/documentation/authentication/#messages
|
||||||
.. _permissions docs: http://www.djangoproject.com/documentation/authentication/#permissions
|
.. _permissions docs: http://www.djangoproject.com/documentation/authentication/#permissions
|
||||||
|
|
||||||
django.core.context_processors.debug
|
django.core.context_processors.debug
|
||||||
|
|
Loading…
Reference in New Issue