~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to docs/ref/contrib/messages.txt

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.2.7 upstream)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: james.westby@ubuntu.com-20101012113435-9lnsrh0i3mxozbt0
Tags: upstream-1.2.3
ImportĀ upstreamĀ versionĀ 1.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. _ref-contrib-messages:
2
 
 
3
1
======================
4
2
The messages framework
5
3
======================
20
18
Enabling messages
21
19
=================
22
20
 
23
 
Messages are implemented through a :ref:`middleware <ref-middleware>`
24
 
class and corresponding :ref:`context processor <ref-templates-api>`.
 
21
Messages are implemented through a :doc:`middleware </ref/middleware>`
 
22
class and corresponding :doc:`context processor </ref/templates/api>`.
25
23
 
26
24
To enable message functionality, do the following:
27
25
 
29
27
      it contains ``'django.contrib.messages.middleware.MessageMiddleware'``.
30
28
 
31
29
      If you are using a :ref:`storage backend <message-storage-backends>` that
32
 
      relies on :ref:`sessions <topics-http-sessions>` (the default),
 
30
      relies on :doc:`sessions </topics/http/sessions>` (the default),
33
31
      ``'django.contrib.sessions.middleware.SessionMiddleware'`` must be
34
32
      enabled and appear before ``MessageMiddleware`` in your
35
33
      :setting:`MIDDLEWARE_CLASSES`.
106
104
The ``LegacyFallbackStorage`` is a temporary tool to facilitate the transition
107
105
from the deprecated ``user.message_set`` API and will be removed in Django 1.4
108
106
according to Django's standard deprecation policy.  For more information, see
109
 
the full :ref:`release process documentation <internals-release-process>`.
 
107
the full :doc:`release process documentation </internals/release-process>`.
110
108
 
111
109
In addition to the functionality in the ``FallbackStorage``, it adds a custom,
112
110
read-only storage class that retrieves messages from the user ``Message``
300
298
    messages.info(request, 'Hello world.', fail_silently=True)
301
299
 
302
300
Internally, Django uses this functionality in the create, update, and delete
303
 
:ref:`generic views <topics-generic-views>` so that they work even if the
 
301
:doc:`generic views </topics/http/generic-views>` so that they work even if the
304
302
message framework is disabled.
305
303
 
306
304
.. note::
343
341
Settings
344
342
========
345
343
 
346
 
A few :ref:`Django settings <ref-settings>` give you control over message
 
344
A few :doc:`Django settings </ref/settings>` give you control over message
347
345
behavior:
348
346
 
349
347
MESSAGE_LEVEL