From 4542389df8576361c77f3af1b4aaddfd51986c6b Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sun, 26 Jun 2022 03:53:09 +0530 Subject: [PATCH] fix: import vars defined in local_settings.py fixes https://gitea.hostea.org/Hostea/dashboard/issues/5 --- dashboard/settings.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/settings.py b/dashboard/settings.py index 03aa88a..7ac0b19 100644 --- a/dashboard/settings.py +++ b/dashboard/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/4.0/ref/settings/ """ from pathlib import Path + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -83,7 +84,7 @@ WSGI_APPLICATION = "dashboard.wsgi.application" DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", - "NAME": "postgres", + "NAME": "db-doesn't-exist", "USER": "postgres", "PASSWORD": "password", "HOST": "localhost", @@ -201,9 +202,8 @@ EMAIL_PORT = 10025 EMAIL_HOST_USER = "admin" EMAIL_HOST_PASSWORD = "password" - try: - import dashboard.local_settings + from dashboard.local_settings import * print("Found local_settings") except ModuleNotFoundError: