update Django to v5

This commit is contained in:
2024-06-05 17:40:45 +08:00
parent d2dc058af5
commit 6cf7087339
17 changed files with 21 additions and 19 deletions

View File

@@ -6,9 +6,9 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"ENGINE": "django.db.backends.postgresql",
"HOST": get_env("POSTGRES_HOST", "127.0.0.1"),
"PORT": get_env("POSTGRES_PORT", "5435"),
"PORT": get_env("POSTGRES_PORT", "5432"),
"NAME": get_env("POSTGRES_DB", "onlinejudge"),
"USER": get_env("POSTGRES_USER", "onlinejudge"),
"PASSWORD": get_env("POSTGRES_PASSWORD", "onlinejudge"),

View File

@@ -2,7 +2,7 @@ from utils.shortcuts import get_env
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"ENGINE": "django.db.backends.postgresql",
"HOST": get_env("POSTGRES_HOST", "oj-postgres"),
"PORT": get_env("POSTGRES_PORT", "5432"),
"NAME": get_env("POSTGRES_DB"),

View File

@@ -1,4 +1,4 @@
from django.conf.urls import include, url
from django.urls import include, re_path as url
urlpatterns = [
url(r"^api/", include("account.urls.oj")),