Skip to content

Commit

Permalink
chore: update Django to 4.2 LTS
Browse files Browse the repository at this point in the history
  • Loading branch information
rikuke committed Apr 3, 2024
1 parent e3b26b4 commit 602f468
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .env.benefit-backend.example
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ AZURE_CONTAINER=
MEDIA_ROOT=/app/var/media

CSRF_COOKIE_NAME=yjdhcsrftoken
CSRF_TRUSTED_ORIGINS="localhost:3000,localhost:3100"
CSRF_TRUSTED_ORIGINS="https://localhost:3000,https://localhost:3100"

YRTTI_BASE_URL=https://yrtti-integration-test.agw.arodevtest.hel.fi/api
YRTTI_AUTH_PASSWORD=
Expand Down
2 changes: 2 additions & 0 deletions backend/benefit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ application using the applicant UI.
1. Install `pip-tools`:

- `pip install pip-tools`
- `pip install --upgrade pip-tools`


2. Add new packages to `requirements.in` or `requirements-dev.in`

Expand Down
12 changes: 9 additions & 3 deletions backend/benefit/helsinkibenefit/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
CORS_ALLOWED_ORIGINS=(list, []),
CORS_ALLOW_ALL_ORIGINS=(bool, False),
CSRF_COOKIE_DOMAIN=(str, "localhost"),
CSRF_TRUSTED_ORIGINS=(list, ["localhost:3000", "localhost:3100"]),
CSRF_TRUSTED_ORIGINS=(list, ["https://localhost:3000", "https://localhost:3100"]),
CSRF_COOKIE_NAME=(str, "yjdhcsrftoken"),
YTJ_BASE_URL=(str, "https://avoindata.prh.fi"),
YTJ_TIMEOUT=(int, 30),
Expand Down Expand Up @@ -468,8 +468,14 @@
FIELD_ENCRYPTION_KEYS = [ENCRYPTION_KEY]

# Django storages
DEFAULT_FILE_STORAGE = env("DEFAULT_FILE_STORAGE")

STORAGES = {
"default": {
"BACKEND": env("DEFAULT_FILE_STORAGE"),
},
"staticfiles": {
"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage",
},
}
AZURE_ACCOUNT_NAME = env("AZURE_ACCOUNT_NAME")
AZURE_ACCOUNT_KEY = env("AZURE_ACCOUNT_KEY")
AZURE_CONTAINER = env("AZURE_CONTAINER")
Expand Down
2 changes: 1 addition & 1 deletion backend/benefit/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ django-sql-utils
django-storages[azure]
django_auth_adfs
djangorestframework
django~=3.2.23
django~=4.2.11
drf-nested-routers
drf-spectacular
elasticsearch~=7.17 # TODO: remove and update to 8.x when elasticsearch servers are updated to elasticsearch 8
Expand Down
5 changes: 2 additions & 3 deletions backend/benefit/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile
# pip-compile requirements.in
#
-e file:../shared
# via -r requirements.in
Expand Down Expand Up @@ -41,7 +41,7 @@ defusedxml==0.7.1
# pysaml2
deprecation==2.1.0
# via django-helusers
django==3.2.23
django==4.2.11
# via
# -r requirements.in
# django-auth-adfs
Expand Down Expand Up @@ -185,7 +185,6 @@ python-stdnum==1.19
pytz==2022.7.1
# via
# babel
# django
# djangorestframework
# pysaml2
pyyaml==6.0
Expand Down

0 comments on commit 602f468

Please sign in to comment.