diff options
author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-11 12:27:40 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-01-14 17:50:04 +0100 |
commit | d08977a0f05cf3efb538dcb09d07915d2ede4c67 (patch) | |
tree | 1efc1c40053cb849c8e677222f408d8bd0435a47 /django/http/request.py | |
parent | 90c59b4e12e6ff41407694a460f5f30c4688dbfd (diff) | |
download | django-d08977a0f05cf3efb538dcb09d07915d2ede4c67.tar.gz |
Refs #30997 -- Removed HttpRequest.is_ajax() per deprecation timeline.
Diffstat (limited to 'django/http/request.py')
-rw-r--r-- | django/http/request.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/django/http/request.py b/django/http/request.py index 2488bf9ccd..bdf9b508b1 100644 --- a/django/http/request.py +++ b/django/http/request.py @@ -1,7 +1,6 @@ import cgi import codecs import copy -import warnings from io import BytesIO from itertools import chain from urllib.parse import parse_qsl, quote, urlencode, urljoin, urlsplit @@ -16,7 +15,6 @@ from django.http.multipartparser import MultiPartParser, MultiPartParserError from django.utils.datastructures import ( CaseInsensitiveMapping, ImmutableList, MultiValueDict, ) -from django.utils.deprecation import RemovedInDjango40Warning from django.utils.encoding import escape_uri_path, iri_to_uri from django.utils.functional import cached_property from django.utils.http import is_same_domain @@ -266,15 +264,6 @@ class HttpRequest: def is_secure(self): return self.scheme == 'https' - def is_ajax(self): - warnings.warn( - 'request.is_ajax() is deprecated. See Django 3.1 release notes ' - 'for more details about this deprecation.', - RemovedInDjango40Warning, - stacklevel=2, - ) - return self.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest' - @property def encoding(self): return self._encoding |