summaryrefslogtreecommitdiff
path: root/docs/topics/conditional-view-processing.txt
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/topics/conditional-view-processing.txt
parent46a3d7604e7fecde8df02ec363200ec5e0ce894e (diff)
Fixed #26447 -- Deprecated settings.USE_ETAGS in favor of ConditionalGetMiddleware.
Diffstat (limited to 'docs/topics/conditional-view-processing.txt')
-rw-r--r--docs/topics/conditional-view-processing.txt19
1 files changed, 8 insertions, 11 deletions
diff --git a/docs/topics/conditional-view-processing.txt b/docs/topics/conditional-view-processing.txt
index 7398b3fd05..7f1fde0fb9 100644
--- a/docs/topics/conditional-view-processing.txt
+++ b/docs/topics/conditional-view-processing.txt
@@ -11,7 +11,7 @@ used for all HTTP methods (``POST``, ``PUT``, ``DELETE``, etc.).
For each page (response) that Django sends back from a view, it might provide
two HTTP headers: the ``ETag`` header and the ``Last-Modified`` header. These
headers are optional on HTTP responses. They can be set by your view function,
-or you can rely on the :class:`~django.middleware.common.CommonMiddleware`
+or you can rely on the :class:`~django.middleware.http.ConditionalGetMiddleware`
middleware to set the ``ETag`` header.
When the client next requests the same resource, it might send along a header
@@ -189,17 +189,14 @@ every time.
Comparison with middleware conditional processing
=================================================
-You may notice that Django already provides simple and straightforward
-conditional ``GET`` handling via the
-:class:`django.middleware.http.ConditionalGetMiddleware` and
-:class:`~django.middleware.common.CommonMiddleware`. While certainly being
-easy to use and suitable for many situations, those pieces of middleware
-functionality have limitations for advanced usage:
+Django provides simple and straightforward conditional ``GET`` handling via
+:class:`django.middleware.http.ConditionalGetMiddleware`. While being easy to
+use and suitable for many situations, the middleware has limitations for
+advanced usage:
-* They are applied globally to all views in your project
-* They don't save you from generating the response itself, which may be
- expensive
-* They are only appropriate for HTTP ``GET`` requests.
+* It's applied globally to all views in your project.
+* It doesn't save you from generating the response, which may be expensive.
+* It's only appropriate for HTTP ``GET`` requests.
You should choose the most appropriate tool for your particular problem here.
If you have a way to compute ETags and modification times quickly and if some