From 28e93008a6d5ac12ed1aba1a1978eaa2dae9dca2 Mon Sep 17 00:00:00 2001 From: jgu2 Date: Wed, 28 Aug 2024 08:59:58 -0600 Subject: [PATCH 1/2] Upgrade Django to 4.2.15 --- calliope_app/account/urls.py | 12 ++++++------ calliope_app/calliope_app/settings/local.py | 2 +- calliope_app/calliope_app/settings/prod.py | 2 +- calliope_app/calliope_app/settings/test.py | 2 +- calliope_app/requirements.txt | 2 +- calliope_app/template/urls.py | 3 --- 6 files changed, 10 insertions(+), 13 deletions(-) diff --git a/calliope_app/account/urls.py b/calliope_app/account/urls.py index fe81ac49..2747e3c9 100644 --- a/calliope_app/account/urls.py +++ b/calliope_app/account/urls.py @@ -1,6 +1,6 @@ from django.contrib.auth import views as auth_views from django.conf import settings -from django.conf.urls import url +from django.urls import re_path from django.urls import path from account import views @@ -26,8 +26,8 @@ views.set_timezone, name='set_timezone' ), - - url( + + re_path( r'^password_reset/$', auth_views.PasswordResetView.as_view( template_name='registration/pw_reset_form.html', @@ -37,14 +37,14 @@ ), name='password_reset' ), - url( + re_path( r'^password_reset/done/$', auth_views.PasswordResetDoneView.as_view( template_name='registration/pw_reset_done.html' ), name='password_reset_done' ), - url( + re_path( r'^reset/\ (?P[0-9A-Za-z_\-]+)/\ (?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,40})/$', @@ -53,7 +53,7 @@ ), name='password_reset_confirm' ), - url( + re_path( r'^reset/done/$', auth_views.PasswordResetCompleteView.as_view( template_name='registration/pw_reset_complete.html' diff --git a/calliope_app/calliope_app/settings/local.py b/calliope_app/calliope_app/settings/local.py index 1bfb2f01..26934ec6 100644 --- a/calliope_app/calliope_app/settings/local.py +++ b/calliope_app/calliope_app/settings/local.py @@ -39,7 +39,7 @@ # -------------------------------------------------------------------------------- DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'ENGINE': 'django.db.backends.postgresql', 'HOST': env.str('POSTGRES_HOST'), 'PORT': env.str('POSTGRES_PORT'), 'USER': env.str('POSTGRES_USER'), diff --git a/calliope_app/calliope_app/settings/prod.py b/calliope_app/calliope_app/settings/prod.py index b314e0a2..99b4a1f4 100644 --- a/calliope_app/calliope_app/settings/prod.py +++ b/calliope_app/calliope_app/settings/prod.py @@ -17,7 +17,7 @@ # -------------------------------------------------------------------------------- DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'ENGINE': 'django.db.backends.postgresql', 'HOST': env.str('POSTGRES_HOST'), 'PORT': env.str('POSTGRES_PORT'), 'USER': env.str('POSTGRES_USER'), diff --git a/calliope_app/calliope_app/settings/test.py b/calliope_app/calliope_app/settings/test.py index 7e066b35..cb118f32 100644 --- a/calliope_app/calliope_app/settings/test.py +++ b/calliope_app/calliope_app/settings/test.py @@ -23,7 +23,7 @@ # -------------------------------------------------------------------------------- DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'ENGINE': 'django.db.backends.postgresql', 'HOST': env.str('POSTGRES_HOST'), 'PORT': env.str('POSTGRES_PORT'), 'USER': env.str('POSTGRES_USER'), diff --git a/calliope_app/requirements.txt b/calliope_app/requirements.txt index daf9d475..b99711d2 100644 --- a/calliope_app/requirements.txt +++ b/calliope_app/requirements.txt @@ -2,7 +2,7 @@ django_ratelimit==4.1.0 git+https://github.com/NREL/GEOPHIRES-X.git#egg=geophires-x boto3==1.24.37 celery[redis]==5.3.0 -django==3.2.25 +django==4.2.15 django-crispy-forms==1.14.0 django-environ>=0.4.5 django-modeltranslation==0.18.12 diff --git a/calliope_app/template/urls.py b/calliope_app/template/urls.py index 1e410db0..b0753de3 100644 --- a/calliope_app/template/urls.py +++ b/calliope_app/template/urls.py @@ -1,6 +1,3 @@ -from django.contrib.auth import views as auth_views -from django.conf import settings -from django.conf.urls import url from django.urls import path from template import views From d5918bf4e88cfbfc8400e7d56905fb18ad6a4c4f Mon Sep 17 00:00:00 2001 From: jgu2 Date: Wed, 28 Aug 2024 09:24:41 -0600 Subject: [PATCH 2/2] Update django imports --- calliope_app/account/urls.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/calliope_app/account/urls.py b/calliope_app/account/urls.py index 2747e3c9..13335979 100644 --- a/calliope_app/account/urls.py +++ b/calliope_app/account/urls.py @@ -1,7 +1,6 @@ from django.contrib.auth import views as auth_views from django.conf import settings -from django.urls import re_path -from django.urls import path +from django.urls import path, re_path from account import views