Skip to content

Upgrade Django from 1.11 to 2.2#1

Open
yitzhakc wants to merge 2 commits intomdl-django-upgradefrom
claude/upgrade-django-2.0-01MTnXWPNr5P1moNaP4kTwqs
Open

Upgrade Django from 1.11 to 2.2#1
yitzhakc wants to merge 2 commits intomdl-django-upgradefrom
claude/upgrade-django-2.0-01MTnXWPNr5P1moNaP4kTwqs

Conversation

@yitzhakc
Copy link
Owner

  • Update requirements.txt to use Django 2.2.* (instead of 2.0 due to Python 3.11 compatibility)
  • Replace deprecated django.core.urlresolvers with django.urls in gauth/views.py
  • Replace deprecated render_to_response with render in system/decorators.py
  • Convert all url() calls to re_path() in 6 URL configuration files:
    • sefaria/urls_shared.py
    • sefaria/urls_library.py
    • sefaria/urls_sheets.py
    • sites/sefaria/urls.py
    • sites/generic/urls.py
    • sites/s4d/urls.py

Note: Django 2.0.x is not compatible with Python 3.10+, so Django 2.2 (the latest 2.x LTS release) was used instead.

Description

A brief description of the PR

Code Changes

The following changes were made to the files below

Notes

Any additional notes go here

- Update requirements.txt to use Django 2.2.* (instead of 2.0 due to Python 3.11 compatibility)
- Replace deprecated django.core.urlresolvers with django.urls in gauth/views.py
- Replace deprecated render_to_response with render in system/decorators.py
- Convert all url() calls to re_path() in 6 URL configuration files:
  - sefaria/urls_shared.py
  - sefaria/urls_library.py
  - sefaria/urls_sheets.py
  - sites/sefaria/urls.py
  - sites/generic/urls.py
  - sites/s4d/urls.py

Note: Django 2.0.x is not compatible with Python 3.10+, so Django 2.2
(the latest 2.x LTS release) was used instead.
django-hosts 7.0 requires Django 4+, so downgrade to version 4.0
which is compatible with Django 2.2.
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