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] upgraded django to 4.1 #3945

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amitsrivastava
Copy link
Collaborator

Several other libraries have also been upgraded along with it. Three code changes had to be made.

  1. Django 4 wants the middlewares to be explicitly sync and async. Rather than rewriting all of the middleware classes, I took the shortcut of creating a new mixin class that supports only sync calls.

  2. CSRF_TRUSTED_ORIGINS in django 4+ need the scheme part as well. We now check and add http and https to the origins.

  3. django-babel also needs a change every time we do a django upgrade. This is mostly just changes around django version support.

There is also some change to our database support due to this. Following is the list of supported db versions.

  • PostgreSQL 11 and higher
  • MariaDB 10.3 and higher
  • MySQL 5.7 and higher
  • Oracle Database Server versions 19c and higher. Version 7.0 or higher of the cx_Oracle Python driver is required.

What changes were proposed in this pull request?

  • (Please fill in changes proposed in this fix)

How was this patch tested?

  • (Please explain how this patch was tested. Ex: unit tests, manual tests)
  • (If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)

Please review Hue Contributing Guide before opening a pull request.

Several other libraries have also been upgraded along with it.
Three code changes had to be made.

1. Django 4 wants the middlewares to be explicitly sync and async.
Rather than rewriting all of the middleware classes, I took the
shortcut of creating a new mixin class that supports only sync calls.

2. CSRF_TRUSTED_ORIGINS in django 4+ need the scheme part as well. We
now check and add `http` and `https` to the origins.

3. django-babel also needs a change every time we do a django upgrade.
This is mostly just changes around django version support.
Copy link
Contributor

@ranade1 ranade1 left a comment

Choose a reason for hiding this comment

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

looks good.

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.

2 participants