diff --git a/note_kfet/settings/__init__.py b/note_kfet/settings/__init__.py index 30ed781d..550977cb 100644 --- a/note_kfet/settings/__init__.py +++ b/note_kfet/settings/__init__.py @@ -7,7 +7,10 @@ if app_stage == 'prod': from .production import * else: from .development import * +# Load password for database and SECRET_KEY + try: from .secrets import * -except: +except ImportError: from .secrets_example.py import * + print("Use default secrets!") diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index ba6726ad..9c98b2b6 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -159,7 +159,3 @@ STATIC_URL = '/static/' ALIAS_VALIDATOR_REGEX = r'' -try: - from .settings_local import * -except ImportError: - pass diff --git a/note_kfet/settings/secrets_example.py b/note_kfet/settings/secrets_example.py index 77662a48..3c7c4ac5 100644 --- a/note_kfet/settings/secrets_example.py +++ b/note_kfet/settings/secrets_example.py @@ -1,2 +1,2 @@ -DATABASE['default']['PASSWORD'] ='CHANGE_ME' +DATABASES['default']['PASSWORD'] ='CHANGE_ME' SECRET_KEY = 'CHANGE_ME'