diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-06-03 08:47:19 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-06-03 08:48:21 +0200 |
| commit | 619e3db7d5fca54afbd9c4e0905b59571989fc6f (patch) | |
| tree | 5965cae3787888f8a3ae3c280422473830dec430 | |
| parent | fdd2b01e8e12857aad2219a46a41bd9051ec8f8d (diff) | |
[3.1.x] Refs #30997 -- Improved HttpRequest.is_ajax() warning message with stacklevel=2.
Backport of 7fc317ae736e8fda1aaf4d4ede84d95fffaf5281 from master
| -rw-r--r-- | django/http/request.py | 1 |
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' |
