summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBen Lomax <lomax.on.the.run@gmail.com>2023-07-08 21:54:37 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-07-10 11:43:36 +0200
commitb7a17b0ea0a2061bae752a3a2292007d41825814 (patch)
treeea2607dfea49472007ee2318684e497dc91a71f1 /docs
parentfb1c7635065321d415ad8182caf986a824bf9650 (diff)
Refs #31949 -- Made @vary_on_(cookie/headers) decorators work with async functions.
Diffstat (limited to 'docs')
-rw-r--r--docs/releases/5.0.txt2
-rw-r--r--docs/topics/async.txt2
-rw-r--r--docs/topics/http/decorators.txt8
3 files changed, 12 insertions, 0 deletions
diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt
index 8884886b51..0ad0835c29 100644
--- a/docs/releases/5.0.txt
+++ b/docs/releases/5.0.txt
@@ -268,6 +268,8 @@ Decorators
* :func:`~django.views.decorators.http.require_GET`
* :func:`~django.views.decorators.http.require_POST`
* :func:`~django.views.decorators.http.require_safe`
+ * :func:`~django.views.decorators.vary.vary_on_cookie`
+ * :func:`~django.views.decorators.vary.vary_on_headers`
* ``xframe_options_deny()``
* ``xframe_options_sameorigin()``
* ``xframe_options_exempt()``
diff --git a/docs/topics/async.txt b/docs/topics/async.txt
index 8554e1effb..b16ffe0f78 100644
--- a/docs/topics/async.txt
+++ b/docs/topics/async.txt
@@ -94,6 +94,8 @@ view functions:
* :func:`~django.views.decorators.http.require_GET`
* :func:`~django.views.decorators.http.require_POST`
* :func:`~django.views.decorators.http.require_safe`
+* :func:`~django.views.decorators.vary.vary_on_cookie`
+* :func:`~django.views.decorators.vary.vary_on_headers`
* ``xframe_options_deny()``
* ``xframe_options_sameorigin()``
* ``xframe_options_exempt()``
diff --git a/docs/topics/http/decorators.txt b/docs/topics/http/decorators.txt
index 973eda72fe..38e528ecf5 100644
--- a/docs/topics/http/decorators.txt
+++ b/docs/topics/http/decorators.txt
@@ -115,6 +115,10 @@ caching based on specific request headers.
.. function:: vary_on_cookie(func)
+ .. versionchanged:: 5.0
+
+ Support for wrapping asynchronous view functions was added.
+
.. function:: vary_on_headers(*headers)
The ``Vary`` header defines which request headers a cache mechanism should take
@@ -122,6 +126,10 @@ caching based on specific request headers.
See :ref:`using vary headers <using-vary-headers>`.
+ .. versionchanged:: 5.0
+
+ Support for wrapping asynchronous view functions was added.
+
.. module:: django.views.decorators.cache
Caching