summaryrefslogtreecommitdiff
path: root/docs/ref/request-response.txt
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-11 12:27:40 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2021-01-14 17:50:04 +0100
commitd08977a0f05cf3efb538dcb09d07915d2ede4c67 (patch)
tree1efc1c40053cb849c8e677222f408d8bd0435a47 /docs/ref/request-response.txt
parent90c59b4e12e6ff41407694a460f5f30c4688dbfd (diff)
Refs #30997 -- Removed HttpRequest.is_ajax() per deprecation timeline.
Diffstat (limited to 'docs/ref/request-response.txt')
-rw-r--r--docs/ref/request-response.txt17
1 files changed, 0 insertions, 17 deletions
diff --git a/docs/ref/request-response.txt b/docs/ref/request-response.txt
index 819272bd6e..4f4de1be1c 100644
--- a/docs/ref/request-response.txt
+++ b/docs/ref/request-response.txt
@@ -425,23 +425,6 @@ Methods
<django.views.decorators.vary.vary_on_headers>` so that the responses are
properly cached.
-.. method:: HttpRequest.is_ajax()
-
- .. deprecated:: 3.1
-
- Returns ``True`` if the request was made via an ``XMLHttpRequest``, by
- checking the ``HTTP_X_REQUESTED_WITH`` header for the string
- ``'XMLHttpRequest'``. Most modern JavaScript libraries send this header.
- If you write your own ``XMLHttpRequest`` call (on the browser side), you'll
- have to set this header manually if you want ``is_ajax()`` to work.
-
- If a response varies on whether or not it's requested via AJAX and you are
- using some form of caching like Django's :mod:`cache middleware
- <django.middleware.cache>`, you should decorate the view with
- :func:`vary_on_headers('X-Requested-With')
- <django.views.decorators.vary.vary_on_headers>` so that the responses are
- properly cached.
-
.. method:: HttpRequest.read(size=None)
.. method:: HttpRequest.readline()
.. method:: HttpRequest.readlines()