From df0523debcc2d0984f1bc11d323f04227d4b388b Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Tue, 4 Nov 2014 22:19:10 +0200 Subject: Fixed #23531 -- Added CommonMiddleware.response_redirect_class. --- docs/ref/middleware.txt | 8 ++++++++ docs/releases/1.8.txt | 7 +++++++ 2 files changed, 15 insertions(+) (limited to 'docs') 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 + ` + attribute allows you to customize the redirects issued by the middleware. + Migrations ^^^^^^^^^^ -- cgit v1.3