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