summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-11-04 22:19:10 +0200
committerTim Graham <timograham@gmail.com>2014-11-04 17:56:57 -0500
commitdf0523debcc2d0984f1bc11d323f04227d4b388b (patch)
tree59fe14bb211ba8e0e3c93af7f031a1d6fb5fd602 /docs
parent83daf53636da676bc3a32b957168e9205714198e (diff)
Fixed #23531 -- Added CommonMiddleware.response_redirect_class.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/middleware.txt8
-rw-r--r--docs/releases/1.8.txt7
2 files changed, 15 insertions, 0 deletions
diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt
index 3ba7d52b9d..8f3f3094e9 100644
--- a/docs/ref/middleware.txt
+++ b/docs/ref/middleware.txt
@@ -66,6 +66,14 @@ Adds a few conveniences for perfectionists:
for each request by MD5-hashing the page content, and it'll take care of
sending ``Not Modified`` responses, if appropriate.
+.. attribute:: CommonMiddleware.response_redirect_class
+
+.. versionadded:: 1.8
+
+Defaults to :class:`~django.http.HttpResponsePermanentRedirect`. Subclass
+``CommonMiddleware`` and override the attribute to customize the redirects
+issued by the middleware.
+
.. class:: BrokenLinkEmailsMiddleware
* Sends broken link notification emails to :setting:`MANAGERS` (see
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index d5bae559a7..e1bca107df 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -304,6 +304,13 @@ Management Commands
:setting:`FIXTURE_DIRS` contains duplicates or a default fixture directory
path (``app_name/fixtures``), an exception is raised.
+Middleware
+^^^^^^^^^^
+
+* The :attr:`CommonMiddleware.response_redirect_class
+ <django.middleware.common.CommonMiddleware.response_redirect_class>`
+ attribute allows you to customize the redirects issued by the middleware.
+
Migrations
^^^^^^^^^^