From 7537b26fbe97258f04941417ec47719e31cd3c88 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Tue, 24 Sep 2024 22:06:50 +0200 Subject: [PATCH] feat(settings): Make databases configurable --- src/app/settings.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/app/settings.py b/src/app/settings.py index 1a22f82..ccccb63 100644 --- a/src/app/settings.py +++ b/src/app/settings.py @@ -98,12 +98,15 @@ ASGI_APPLICATION = "app.asgi.application" # Database configuration # -> https://docs.djangoproject.com/en/4.2/ref/settings/#databases -DATABASES = { - "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": BASE_DIR / "db.sqlite3", - } -} +DATABASES = credentials.get_json( + "DATABASES", + { + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": BASE_DIR / "db.sqlite3", + } + }, +) ###