Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 4 ajax #288

Open
jonaqp opened this issue Jun 17, 2022 · 3 comments
Open

Django 4 ajax #288

jonaqp opened this issue Jun 17, 2022 · 3 comments
Milestone

Comments

@jonaqp
Copy link

jonaqp commented Jun 17, 2022

need change:

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:

here modify:
if request.headers.get('x-requested-with') == 'XMLHttpRequest' and request_method in self.http_method_names:

its work now

@im-n1
Copy link

im-n1 commented Jul 23, 2022

This seems to be done but probably not release yet.

@blatinier
Copy link

A release would be very welcome for this one

@kennethlove kennethlove added this to the v2 milestone Feb 10, 2023
@Sahil-Midriff
Copy link

that's also not working

kennethlove added a commit that referenced this issue May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants