Modified files
pyproject.toml
---
+++
@@ -9,6 +9,8 @@
python = "^3.12"
django = "^5.1.3"
django-allauth = {extras = ["socialaccount"], version = "^65.2.0"}
+psycopg = "^3.2.3"
+dj-database-url = "^2.3.0"
[tool.poetry.group.dev.dependencies]
djangocourse/settings.py
---
+++
@@ -11,6 +11,7 @@
"""
from pathlib import Path
+import dj_database_url
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@@ -109,10 +110,7 @@
# https://docs.djangoproject.com/en/5.1/ref/settings/#databases
DATABASES = {
- 'default': {
- 'ENGINE': 'django.db.backends.sqlite3',
- 'NAME': BASE_DIR / 'db.sqlite3',
- }
+ 'default': dj_database_url.config(conn_max_age=600)
}
AUTH_USER_MODEL = "app.UserProfile"