You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Django 3.1, the method request.is_ajax() is deprecated and will be
removed in a future version. Using Django 3.1 with django-debug-toolbar
results in the warning:
django-debug-toolbar/debug_toolbar/middleware.py:80: RemovedInDjango40Warning: request.is_ajax() is deprecated. See Django 3.1 release notes for more details about this deprecation.
request.is_ajax(),
The calls were removed with no replacements as these check are
unnecessary anyway. If the response is not HTML (e.g. JSON) then the
check `or content_type not in _HTML_TYPES` will evaluate as false and
the toolbar will not be included in the response. If the response is an
HTML fragment, it will not contain an `</body>` element (the
INSERT_BEFORE pattern) and so will also not be included in the response.
Fixes#1368
0 commit comments