diff --git a/sophon/settings.py b/sophon/settings.py index 33c4191..41c3167 100644 --- a/sophon/settings.py +++ b/sophon/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib import Path +import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -20,10 +21,10 @@ BASE_DIR = Path(__file__).resolve().parent.parent # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '%oe8eyp^)-t*7p*_o@v09i7san+_en!pa@b_985o+xx)hvs4(%' +SECRET_KEY = os.environ["DJANGO_SECRET_KEY"] # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = bool(os.environ.get("DJANGO_DEBUG")) ALLOWED_HOSTS = [] @@ -103,9 +104,9 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/3.1/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = os.environ.get("DJANGO_LANGUAGE_CODE", "en-us") -TIME_ZONE = 'UTC' +TIME_ZONE = os.environ.get("DJANGO_TIME_ZONE", "UTC") USE_I18N = True