From d08977a0f05cf3efb538dcb09d07915d2ede4c67 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 11 Jan 2021 12:27:40 +0100 Subject: Refs #30997 -- Removed HttpRequest.is_ajax() per deprecation timeline. --- docs/ref/request-response.txt | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'docs/ref') 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 ` 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 - `, you should decorate the view with - :func:`vary_on_headers('X-Requested-With') - ` so that the responses are - properly cached. - .. method:: HttpRequest.read(size=None) .. method:: HttpRequest.readline() .. method:: HttpRequest.readlines() -- cgit v1.3