diff options
Diffstat (limited to 'app/app/settings.py')
| -rw-r--r-- | app/app/settings.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/app/settings.py b/app/app/settings.py index f24a6b3..7e41f74 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -18,7 +18,11 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) def get_default_config(): - return yaml.load(open(BASE_DIR + '/config.yml').read()) + if os.path.exists(BASE_DIR + '/config.yml'): + return yaml.load(open(BASE_DIR + '/config.yml').read()) + else: + print("Warning: loading example config! Create config.yml Soon!") + return yaml.load(open(BASE_DIR + '/config-example.yml').read()) CONFIG = {} @@ -47,6 +51,14 @@ ALLOWED_HOSTS = CONFIG['allowed_hosts'] ADMINS = CONFIG['admins'] +if CONFIG.get('SET_EMAIL'): + EMAIL_HOST = CONFIG['EMAIL_HOST'] + EMAIL_HOST_PASSWORD = CONFIG['EMAIL_HOST_PASSWORD'] + EMAIL_HOST_USER = CONFIG['EMAIL_HOST_USER'] + EMAIL_PORT = CONFIG['EMAIL_PORT'] + EMAIL_USE_TLS = CONFIG['EMAIL_USE_TLS'] + + AUTH_USER_MODEL = 'dispatchAuth.User' |
