Skip to content

Conversation

@fsck-chk
Copy link

Package Upgrade Summary

Backend (Python/Django)

Major Package Upgrades:

Django: 3.x -> 5.0-5.1
Django REST Framework: -> 3.15.1+
Authentication: rest_auth -> dj_rest_auth 7.0.1+
django-allauth: -> 65.13.1+
Python: Targeting 3.13+
PyPDF2: API changes (PdfFileWriter -> PdfWriter, PdfFileReader -> PdfReader)
Pillow: -> 12.0+
gunicorn: -> 22.0+
Dependency Management:

Added uv / pyproject.toml for ease of install.
Django 4.0+ Migrations:

django.conf.urls.url -> django.urls.re_path
ugettext_lazy -> gettext_lazy
Added DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
Memcached backend: MemcachedCache -> PyMemcacheCache
Added required middleware: allauth.account.middleware.AccountMiddleware
Python 3.9+ Migrations:

pytz -> zoneinfo.ZoneInfo (standard library)
Modern import styles
Code Formatting:

Entire Python codebase reformatted (single -> double quotes) (Ruff format)
Import statements reorganized and cleaned up
Frontend (JavaScript/React)

Major Package Upgrades:

React: 16.13.1 -> 18.3.1
React Router: 5.1.2 -> 6.28.0 (breaking changes)
react-scripts: 3.4.1 -> 5.0.1
Semantic UI React: 0.88.2 -> 2.1.5
Testing Library: Major version bumps (4.x -> 6.x, 9.x -> 16.x)
Date/Time Library Migration:

Removed moment.js -> Added dayjs 1.11.19
Converted ~50 instances
React 18 Changes:

ReactDOM.render() -> ReactDOM.createRoot().render()
React Router v6 Changes:

Switch -> Routes component
useHistory() -> useNavigate() hook
Route structure refactored in App.js
E2E Testing:

Added Puppeteer-based visual regression tests
New files: e2e/tests/, helpers, jest config
Added dev dependencies: puppeteer, pixelmatch, pngjs
Configuration Changes

django-allauth Settings (settings.py)

Updated for django-allauth v65+ for backward compatibility:
ACCOUNT_AUTHENTICATION_METHOD = "username"
ACCOUNT_LOGIN_METHODS = {"username"}
ACCOUNT_SIGNUP_FIELDS = {
"username": {"required": True},
"email": {"required": True},
}
ACCOUNT_USERNAME_REQUIRED = True
ACCOUNT_EMAIL_REQUIRED = True

- App.js: Fixed route wildcard (path='/' → path='*') for nested routes
- ManageScroll.js: useHistory → useLocation
- LoginSignup.js: useHistory → useNavigate
- Home.js: removed unused useHistory
- Quiz.js: removed unused useHistory
- Debug.js: removed unused useHistory
- Account.js: useHistory → useNavigate
- Storage.js: useHistory → useNavigate
history.push() replaced with navigate()
history.location replaced with location from useLocation()
outer Route from path='/' -> path='*'
@tannercollin
Copy link

Amazing work! I tried doing this back in June but gave up when I got to django-rest-auth.

We should chat, shoot me an email: [email protected]

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