summaryrefslogtreecommitdiff
path: root/docs/topics/http
diff options
context:
space:
mode:
authorMarc Garcia <garcia.marc@gmail.com>2009-07-01 23:33:02 +0000
committerMarc Garcia <garcia.marc@gmail.com>2009-07-01 23:33:02 +0000
commitf5095f8cb367e51e18e084ac118d6900ab9ba735 (patch)
tree58baa1119dead8fbb2a0d98af8f70cca0d55ef09 /docs/topics/http
parent87cd3dfa55770e5a987d43797c013d81530083db (diff)
[soc2009/i18n] merged up to trunk r11147
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/i18n-improvements@11148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/topics/http')
-rw-r--r--docs/topics/http/middleware.txt15
-rw-r--r--docs/topics/http/sessions.txt3
2 files changed, 12 insertions, 6 deletions
diff --git a/docs/topics/http/middleware.txt b/docs/topics/http/middleware.txt
index 9040533f33..19facb8371 100644
--- a/docs/topics/http/middleware.txt
+++ b/docs/topics/http/middleware.txt
@@ -107,15 +107,18 @@ middleware is always called on every response.
``request`` is an :class:`~django.http.HttpRequest` object. ``response`` is the
:class:`~django.http. HttpResponse` object returned by a Django view.
-``process_response()`` should return an :class:`~django.http. HttpResponse`
+``process_response()`` must return an :class:`~django.http. HttpResponse`
object. It could alter the given ``response``, or it could create and return a
brand-new :class:`~django.http. HttpResponse`.
-Remember that your middleware will not be called if another middleware object
-returns a response before you. But unlike ``process_request()`` and
-``process_view()``, during the response phase the classes are applied in reverse
-order, from the bottom up. This means classes defined at the end of
-:setting:`MIDDLEWARE_CLASSES` will be run first.
+Unlike the ``process_request()`` and ``process_view()`` methods, the
+``process_response()`` method is always called, even if the ``process_request()``
+and ``process_view()`` methods of the same middleware class were skipped because
+an earlier middleware method returned an :class:`~django.http. HttpResponse`
+(this means that your ``process_response()`` method cannot rely on setup done in
+``process_request()``, for example). In addition, during the response phase the
+classes are applied in reverse order, from the bottom up. This means classes
+defined at the end of :setting:`MIDDLEWARE_CLASSES` will be run first.
.. _exception-middleware:
diff --git a/docs/topics/http/sessions.txt b/docs/topics/http/sessions.txt
index fa3864a7c2..d3956504c7 100644
--- a/docs/topics/http/sessions.txt
+++ b/docs/topics/http/sessions.txt
@@ -4,6 +4,9 @@
How to use sessions
===================
+.. module:: django.contrib.sessions
+ :synopsis: Provides session management for Django projects.
+
Django provides full support for anonymous sessions. The session framework lets
you store and retrieve arbitrary data on a per-site-visitor basis. It stores
data on the server side and abstracts the sending and receiving of cookies.