Update Django to 4.2 and Python to 3.9 #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This update brings the application to a more modern stack with Long-Term Support (LTS) versions of Django and a recent Python version.
Key changes include:
requirements.txt
.django-celery
with the moderncelery[django]
package (Celery 5.3.x).requirements.txt
for compatibility.runtime.txt
file.CELERY_RESULT_BACKEND
,CELERY_BEAT_SCHEDULER
).django_celery_beat
anddjango_celery_results
toINSTALLED_APPS
.urls.py
to usere_path
instead ofurl
._celery.py
and__init__.py
.createsu
management command in Elastic Beanstalk configuration (.ebextensions/03_django.config
) more robust by allowing it to fail without stopping deployment (e.g., if superuser already exists).The
awsebcli
and some of its direct dependencies were kept at older versions due to difficulties in upgrading them alongside other changes. Further work may be needed to modernize those if required.