diff options
| author | Ben Lomax <lomax.on.the.run@gmail.com> | 2023-07-08 22:51:19 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-09-13 11:41:01 +0200 |
| commit | 74f7deec9e334a69bfbfdd068285618534198bd5 (patch) | |
| tree | 44cceda16c83c0eac7512df83ec8bfa4ef05dfee /docs | |
| parent | 059cb0dbc9adc9c330f5fa36ba61acf00a6f259b (diff) | |
Refs #31949 -- Made make_middleware_decorator to work with async functions.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/ref/csrf.txt | 12 | ||||
| -rw-r--r-- | docs/releases/5.0.txt | 5 | ||||
| -rw-r--r-- | docs/topics/async.txt | 5 | ||||
| -rw-r--r-- | docs/topics/http/decorators.txt | 4 |
4 files changed, 26 insertions, 0 deletions
diff --git a/docs/ref/csrf.txt b/docs/ref/csrf.txt index d52539e6b6..ae94ccdee4 100644 --- a/docs/ref/csrf.txt +++ b/docs/ref/csrf.txt @@ -170,6 +170,10 @@ class-based views<decorating-class-based-views>`. # ... return render(request, "a_template.html", c) + .. versionchanged:: 5.0 + + Support for wrapping asynchronous view functions was added. + .. function:: requires_csrf_token(view) Normally the :ttag:`csrf_token` template tag will not work if @@ -190,10 +194,18 @@ class-based views<decorating-class-based-views>`. # ... return render(request, "a_template.html", c) + .. versionchanged:: 5.0 + + Support for wrapping asynchronous view functions was added. + .. function:: ensure_csrf_cookie(view) This decorator forces a view to send the CSRF cookie. + .. versionchanged:: 5.0 + + Support for wrapping asynchronous view functions was added. + Settings ======== diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt index 10ab706645..3bcec805ef 100644 --- a/docs/releases/5.0.txt +++ b/docs/releases/5.0.txt @@ -322,9 +322,14 @@ Decorators * :func:`~django.views.decorators.cache.never_cache` * :func:`~django.views.decorators.common.no_append_slash` * :func:`~django.views.decorators.csrf.csrf_exempt` + * :func:`~django.views.decorators.csrf.csrf_protect` + * :func:`~django.views.decorators.csrf.ensure_csrf_cookie` + * :func:`~django.views.decorators.csrf.requires_csrf_token` * :func:`~django.views.decorators.debug.sensitive_variables` * :func:`~django.views.decorators.debug.sensitive_post_parameters` + * :func:`~django.views.decorators.gzip.gzip_page` * :func:`~django.views.decorators.http.condition` + * ``conditional_page()`` * :func:`~django.views.decorators.http.etag` * :func:`~django.views.decorators.http.last_modified` * :func:`~django.views.decorators.http.require_http_methods` diff --git a/docs/topics/async.txt b/docs/topics/async.txt index 1faf787380..0e33753e68 100644 --- a/docs/topics/async.txt +++ b/docs/topics/async.txt @@ -85,9 +85,14 @@ view functions: * :func:`~django.views.decorators.cache.never_cache` * :func:`~django.views.decorators.common.no_append_slash` * :func:`~django.views.decorators.csrf.csrf_exempt` +* :func:`~django.views.decorators.csrf.csrf_protect` +* :func:`~django.views.decorators.csrf.ensure_csrf_cookie` +* :func:`~django.views.decorators.csrf.requires_csrf_token` * :func:`~django.views.decorators.debug.sensitive_variables` * :func:`~django.views.decorators.debug.sensitive_post_parameters` +* :func:`~django.views.decorators.gzip.gzip_page` * :func:`~django.views.decorators.http.condition` +* ``conditional_page()`` * :func:`~django.views.decorators.http.etag` * :func:`~django.views.decorators.http.last_modified` * :func:`~django.views.decorators.http.require_http_methods` diff --git a/docs/topics/http/decorators.txt b/docs/topics/http/decorators.txt index 38e528ecf5..fa84e8d9b7 100644 --- a/docs/topics/http/decorators.txt +++ b/docs/topics/http/decorators.txt @@ -105,6 +105,10 @@ compression on a per-view basis. It sets the ``Vary`` header accordingly, so that caches will base their storage on the ``Accept-Encoding`` header. + .. versionchanged:: 5.0 + + Support for wrapping asynchronous view functions was added. + .. module:: django.views.decorators.vary Vary headers |
