summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorDenis Cornehl <syphar@fastmail.fm>2016-04-03 12:15:10 +0200
committerTim Graham <timograham@gmail.com>2016-10-10 14:55:59 -0400
commita840710e1e38bc9e55412bb36eca92eff94ebd2c (patch)
treeb6ab8b8456eea42645949cb46114fbab50aae0fa /docs/ref
parent46a3d7604e7fecde8df02ec363200ec5e0ce894e (diff)
Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ConditionalGetMiddleware.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/middleware.txt13
-rw-r--r--docs/ref/settings.txt5
-rw-r--r--docs/ref/utils.txt5
3 files changed, 22 insertions, 1 deletions
diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt
index 5d8939e3ef..432f5437ff 100644
--- a/docs/ref/middleware.txt
+++ b/docs/ref/middleware.txt
@@ -72,6 +72,12 @@ Adds a few conveniences for perfectionists:
Older versions didn't set the ``Content-Length`` header.
+.. deprecated:: 1.11
+
+ The :setting:`USE_ETAGS` setting is deprecated in favor of using
+ :class:`~django.middleware.http.ConditionalGetMiddleware` for ETag
+ processing.
+
.. attribute:: CommonMiddleware.response_redirect_class
Defaults to :class:`~django.http.HttpResponsePermanentRedirect`. Subclass
@@ -166,13 +172,18 @@ Conditional GET middleware
.. class:: ConditionalGetMiddleware
-Handles conditional GET operations. If the response has a ``ETag`` or
+Handles conditional GET operations. If the response doesn't have an ``ETag``
+header, the middleware adds one if needed. If the response has a ``ETag`` or
``Last-Modified`` header, and the request has ``If-None-Match`` or
``If-Modified-Since``, the response is replaced by an
:class:`~django.http.HttpResponseNotModified`.
Also sets the ``Date`` and ``Content-Length`` response-headers.
+.. versionchanged:: 1.11
+
+ In older versions, the middleware didn't set the ``ETag`` header.
+
Locale middleware
-----------------
diff --git a/docs/ref/settings.txt b/docs/ref/settings.txt
index 05faa734b2..28240034e5 100644
--- a/docs/ref/settings.txt
+++ b/docs/ref/settings.txt
@@ -2532,6 +2532,11 @@ bandwidth but slows down performance. This is used by the
:class:`~django.middleware.common.CommonMiddleware` and in the :doc:`cache
framework </topics/cache>`.
+.. deprecated:: 1.11
+
+ This setting is deprecated in favor of using ``ConditionalGetMiddleware``,
+ which sets an ETag regardless of this setting.
+
.. setting:: USE_I18N
``USE_I18N``
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index a9072f9442..45ffd80fc4 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -65,6 +65,11 @@ need to distinguish caches by the ``Accept-language`` header.
In older versions, the ``Last-Modified`` header was also set.
+ .. deprecated:: 1.11
+
+ Since the ``USE_ETAGS`` setting is deprecated, this function won't set
+ the ``ETag`` header when the deprecation ends in Django 2.1.
+
.. function:: add_never_cache_headers(response)
Adds a ``Cache-Control: max-age=0, no-cache, no-store, must-revalidate``