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.0 - method request.is_ajax has been removed #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NielkS
Copy link

@NielkS NielkS commented Jun 1, 2022

Deprecation notice since django 3.1: https://docs.djangoproject.com/en/4.0/releases/3.1/#id2

Copy link

@gabn88 gabn88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://docs.djangoproject.com/en/4.0/releases/3.1/#id2

if we don't want to change the behaviour we should replace "request.is_ajax()" with "request.headers.get('x-requested-with') == 'XMLHttpRequest'"

@gabn88
Copy link

gabn88 commented Jan 23, 2023

@NielkS @ludrao Can we go ahead and merge a fix for this? Django 4 is out for a long time already and this PR has an example fix.

@NielkS
Copy link
Author

NielkS commented Jan 23, 2023

@gabn88 updated PR as you suggested

agusmakmun added a commit to agusmakmun/django-tellme that referenced this pull request Apr 26, 2024
@agusmakmun
Copy link

Guys, for temporary solution to compatible with Django 4+, you can update to this in your requirements.txt file:

django-tellme@git+https://github.com/agusmakmun/django-tellme

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

Successfully merging this pull request may close these issues.

3 participants