diff --git a/.env.example b/.env.example index 99fdf03..0b5594b 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ CELERY_BROKER_URL='redis://redis:6379/0' CELERY_RESULT_BACKEND='redis://redis:6379/0' -DJANGO_DEBUG='True' +DJANGO_DEBUG='False' DJANGO_SECRET_KEY='changeme' diff --git a/src/epub2go_web/settings.py b/src/epub2go_web/settings.py index a0745b8..f0e567e 100644 --- a/src/epub2go_web/settings.py +++ b/src/epub2go_web/settings.py @@ -12,6 +12,7 @@ https://docs.djangoproject.com/en/5.1/ref/settings/ import environ from pathlib import Path +import os # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -19,7 +20,9 @@ PROJ_DIR = Path(__file__).resolve().parent BASE_DIR = PROJ_DIR.parent env = environ.Env( DJANGO_DEBUG=(bool, True), + DJANGO_SECRET_KEY=(str, 'changeme'), ) +environ.Env.read_env(os.path.join(BASE_DIR, '.env')) # Quick-start development settings - unsuitable for production