diff options
| author | Luke Plant <L.Plant.98@cantab.net> | 2009-12-09 16:57:23 +0000 |
|---|---|---|
| committer | Luke Plant <L.Plant.98@cantab.net> | 2009-12-09 16:57:23 +0000 |
| commit | 25020ddb05543fff1c37d77b49bd937fd2bbb170 (patch) | |
| tree | b156768f680819c54a73a2926b81d5d84d0e2205 /docs/topics/auth.txt | |
| parent | eeb10d5f2c5375ec28b7761f9ea0fd4f1d2e4bd1 (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/topics/auth.txt')
| -rw-r--r-- | docs/topics/auth.txt | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt index 33461a0858..ebd31e4e20 100644 --- a/docs/topics/auth.txt +++ b/docs/topics/auth.txt @@ -23,6 +23,9 @@ The auth system consists of: user. * Messages: A simple way to queue messages for given users. +.. deprecated:: 1.2 + The Messages component of the auth system will be removed in Django 1.4. + Installation ============ @@ -1289,6 +1292,11 @@ messages. Messages ======== +.. deprecated:: 1.2 + This functionality will be removed in Django 1.4. You should use the + :ref:`messages framework <ref-contrib-messages>` for all new projects and + begin to update your existing code immediately. + The message system is a lightweight way to queue messages for given users. A message is associated with a :class:`~django.contrib.auth.models.User`. @@ -1334,13 +1342,16 @@ logged-in user and his/her messages are made available in the </ul> {% endif %} -Note that :class:`~django.template.context.RequestContext` calls -:meth:`~django.contrib.auth.models.User.get_and_delete_messages` behind the -scenes, so any messages will be deleted even if you don't display them. +.. versionchanged:: 1.2 + The ``messages`` template variable uses a backwards compatible method in the + :ref:`messages framework <ref-contrib-messages>` to retrieve messages from + both the user ``Message`` model and from the new framework. Unlike in + previous revisions, the messages will not be erased unless they are actually + displayed. Finally, note that this messages framework only works with users in the user database. To send messages to anonymous users, use the -:ref:`session framework <topics-http-sessions>`. +:ref:`messages framework <ref-contrib-messages>`. .. _authentication-backends: |
