From 24c39f71a6d851728627a501b1a8e43f9b243803 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Sun, 10 Apr 2022 11:51:46 +0300 Subject: [PATCH] fix --- bots/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bots/utils.py b/bots/utils.py index a20430f..5273a4d 100644 --- a/bots/utils.py +++ b/bots/utils.py @@ -66,7 +66,7 @@ class AjaxResponseMixin(object): def dispatch(self, request, *args, **kwargs): request_method = request.method.lower() - if request.is_ajax() and request_method in self.http_method_names: + if request.accepts("application/json") and request_method in self.http_method_names: handler = getattr(self, "{0}_ajax".format(request_method), self.http_method_not_allowed) self.request = request