From a9543587fde19ab13bdbcd42b4ffc5221f56886c Mon Sep 17 00:00:00 2001 From: Evan Tung Date: Sat, 25 Nov 2023 22:17:15 -0500 Subject: [PATCH] Change database to use DATABASE_URL if it exists --- sibyl/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sibyl/settings.py b/sibyl/settings.py index e17cfc0..d612ef3 100644 --- a/sibyl/settings.py +++ b/sibyl/settings.py @@ -83,7 +83,7 @@ # https://docs.djangoproject.com/en/4.0/ref/settings/#databases DATABASES = { - 'default': dj_database_url.parse(os.getenv("DATABASE_URL")) if os.getenv("ENV") == "production" else { + 'default': dj_database_url.parse(os.getenv("DATABASE_URL")) if "DATABASE_URL" in os.environ else { "ENGINE": 'django.db.backends.sqlite3', "NAME": os.path.join(BASE_DIR, "db.sqlite3") }