summaryrefslogtreecommitdiff
path: root/django/http/request.py
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2020-06-03 08:47:19 +0200
committerGitHub <noreply@github.com>2020-06-03 08:47:19 +0200
commit7fc317ae736e8fda1aaf4d4ede84d95fffaf5281 (patch)
tree94ce3d128e1ae0048f7a395a358b2de2922587a4 /django/http/request.py
parentdf32fd42b84cc6dbba173201f244491b0d154a63 (diff)
downloaddjango-7fc317ae736e8fda1aaf4d4ede84d95fffaf5281.tar.gz
Refs #30997 -- Improved HttpRequest.is_ajax() warning message with stacklevel=2.
Diffstat (limited to 'django/http/request.py')
-rw-r--r--django/http/request.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/http/request.py b/django/http/request.py
index 66809a74ed..083bf2d80f 100644
--- a/django/http/request.py
+++ b/django/http/request.py
@@ -262,6 +262,7 @@ class HttpRequest:
'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'