summaryrefslogtreecommitdiff
path: root/docs/ref/settings.txt
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2009-12-09 16:57:23 +0000
committerLuke Plant <L.Plant.98@cantab.net>2009-12-09 16:57:23 +0000
commit25020ddb05543fff1c37d77b49bd937fd2bbb170 (patch)
treeb156768f680819c54a73a2926b81d5d84d0e2205 /docs/ref/settings.txt
parenteeb10d5f2c5375ec28b7761f9ea0fd4f1d2e4bd1 (diff)
Fixed #4604 - Configurable message passing system, supporting anonymous users
This deprecates User.message_set in favour of a configurable messaging system, with backends provided for cookie storage, session storage and backward compatibility. Many thanks to Tobias McNulty for the bulk of the work here, with contributions from Chris Beaven (SmileyChris) and lots of code review from Russell Keith-Magee, and input from many others. Also credit to the authors of various messaging systems for Django whose ideas may have been pinched :-) git-svn-id: http://code.djangoproject.com/svn/django/trunk@11804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/ref/settings.txt')
-rw-r--r--docs/ref/settings.txt53
1 files changed, 51 insertions, 2 deletions
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 6e78030e8c..9730c1ddf4 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -812,6 +812,43 @@ Bad: ``"http://www.example.com/static"``
.. setting:: MIDDLEWARE_CLASSES
+MESSAGE_LEVEL
+-------------
+
+.. versionadded:: 1.2
+
+Default: `messages.INFO`
+
+Sets the minimum message level that will be recorded by the messages
+framework. See the :ref:`messages documentation <ref-contrib-messages>` for
+more details.
+
+MESSAGE_STORAGE
+---------------
+
+.. versionadded:: 1.2
+
+Default: ``'django.contrib.messages.storage.user_messages.LegacyFallbackStorage'``
+
+Controls where Django stores message data. See the
+:ref:`messages documentation <ref-contrib-messages>` for more details.
+
+MESSAGE_TAGS
+------------
+
+.. versionadded:: 1.2
+
+Default::
+
+ {messages.DEBUG: 'debug',
+ messages.INFO: 'info',
+ messages.SUCCESS: 'success',
+ messages.WARNING: 'warning',
+ messages.ERROR: 'error',}
+
+Sets the mapping of message levels to message tags. See the
+:ref:`messages documentation <ref-contrib-messages>` for more details.
+
MIDDLEWARE_CLASSES
------------------
@@ -820,10 +857,16 @@ Default::
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
- 'django.contrib.auth.middleware.AuthenticationMiddleware',)
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',)
A tuple of middleware classes to use. See :ref:`topics-http-middleware`.
+.. versionchanged:: 1.2
+ ``'django.contrib.messages.middleware.MessageMiddleware'`` was added to the
+ default. For more information, see the :ref:`messages documentation
+ <ref-contrib-messages>`.
+
.. setting:: MONTH_DAY_FORMAT
MONTH_DAY_FORMAT
@@ -1059,12 +1102,18 @@ Default::
("django.core.context_processors.auth",
"django.core.context_processors.debug",
"django.core.context_processors.i18n",
- "django.core.context_processors.media")
+ "django.core.context_processors.media",
+ "django.contrib.messages.context_processors.messages")
A tuple of callables that are used to populate the context in ``RequestContext``.
These callables take a request object as their argument and return a dictionary
of items to be merged into the context.
+.. versionchanged:: 1.2
+ ``"django.contrib.messages.context_processors.messages"`` was added to the
+ default. For more information, see the :ref:`messages documentation
+ <ref-contrib-messages>`.
+
.. setting:: TEMPLATE_DEBUG
TEMPLATE_DEBUG