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

fix: Django < 2.2 does not have request.headers #231

Merged
merged 1 commit into from
Sep 5, 2022

Conversation

vreynolds
Copy link
Contributor

Which problem is this PR solving?

Short description of the changes

  • request.headers was a nicer wrapper for headers introduced in Django 2.2
  • self.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest' is the exact implementation of is_ajax

- this was initially changed to stop using deprecated request.is_ajax()
- self.META.get('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest' is the exact implementation of is_ajax
@vreynolds vreynolds requested review from a team and MikeGoldsmith September 2, 2022 22:33
@vreynolds vreynolds added type: bug Something isn't working version: bump patch A PR with release-worthy changes and is backwards-compatible. labels Sep 2, 2022
@vreynolds vreynolds self-assigned this Sep 2, 2022
@vreynolds vreynolds merged commit 9100c2a into main Sep 5, 2022
@vreynolds vreynolds deleted the vera.fix-older-django branch September 5, 2022 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working version: bump patch A PR with release-worthy changes and is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determine (and update) minimum supported Django version
2 participants