We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.2
FAILED cms/djangoapps/maintenance/tests.py::MaintenanceViewAccessTests::test_global_staff_access_1__maintenance_force_publish_course - AttributeError: 'WSGIRequest' object has no attribute 'is_ajax' FAILED cms/djangoapps/maintenance/tests.py::TestForcePublish::test_already_published - AttributeError: 'WSGIRequest' object has no attribute 'is_ajax' FAILED cms/djangoapps/maintenance/tests.py::TestForcePublish::test_force_publish_dry_run - AttributeError: 'WSGIRequest' object has no attribute 'is_ajax' FAILED cms/djangoapps/maintenance/tests.py::TestForcePublish::test_invalid_course_key_messages_1_______Please_provide_course_id___ - AttributeError: 'WSGIRequest' object has no attribute 'is_ajax' FAILED cms/djangoapps/maintenance/tests.py::TestForcePublish::test_invalid_course_key_messages_2___edx____Invalid_course_key___ - AttributeError: 'WSGIRequest' object has no attribute 'is_ajax' FAILED cms/djangoapps/maintenance/tests.py::TestForcePublish::test_invalid_course_key_messages_3___course_v1_e_d_X____No_matching_course_found___ - AttributeError: 'WSGIRequest' object has no attribute 'is_ajax' ====== 6 failed, 106 passed, 26 skipped, 267 warnings in 76.29s (0:01:16) ======
The text was updated successfully, but these errors were encountered:
request.is_ajax() was deprecated in Django 3.1 and now has been removed in Django 4.0. Solution for the issue https://stackoverflow.com/a/70976929/20185847
request.is_ajax()
Django 3.1
Django 4.0
Replacing
if request.is_ajax():
with
if request.headers.get('x-requested-with') == 'XMLHttpRequest':
should work.
Sorry, something went wrong.
No branches or pull requests
Description
Django 4.2
, the error is being generated.Django 4.2
.Test Run Logs
The text was updated successfully, but these errors were encountered: