summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorlufafajoshua <77637648+lufafajoshua@users.noreply.github.com>2024-06-12 12:26:40 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-06-12 13:11:29 +0200
commite2428292abaca4758a7508175d31667fe2dff57c (patch)
tree76c128ca7fa6baa997ed401c3956a252670f0514 /docs
parent708b01c79501eb9fd73cc5f01a724205d70a6d30 (diff)
Fixed #35401 -- Documented the conditional_page() decorator.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/middleware.txt3
-rw-r--r--docs/topics/http/decorators.txt5
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/ref/middleware.txt b/docs/ref/middleware.txt
index d899922dc1..c762457839 100644
--- a/docs/ref/middleware.txt
+++ b/docs/ref/middleware.txt
@@ -153,6 +153,9 @@ header, the middleware adds one if needed. If the response has an ``ETag`` or
``If-Modified-Since``, the response is replaced by an
:class:`~django.http.HttpResponseNotModified`.
+You can handle conditional GET operations with individual views using the
+:func:`~django.views.decorators.http.conditional_page()` decorator.
+
Locale middleware
-----------------
diff --git a/docs/topics/http/decorators.txt b/docs/topics/http/decorators.txt
index 9cad144954..1c48e667f1 100644
--- a/docs/topics/http/decorators.txt
+++ b/docs/topics/http/decorators.txt
@@ -63,6 +63,11 @@ control caching behavior on particular views.
.. function:: condition(etag_func=None, last_modified_func=None)
+.. function:: conditional_page()
+
+ This decorator provides the conditional GET operation handling of
+ :class:`~django.middleware.http.ConditionalGetMiddleware` to a view.
+
.. function:: etag(etag_func)
.. function:: last_modified(last_modified_func)