From 741f8c534d5f38632ee76d2239a22fb93badfce1 Mon Sep 17 00:00:00 2001 From: eneller Date: Mon, 22 Sep 2025 13:39:38 +0200 Subject: [PATCH] fix: development setup --- .env.example | 2 +- src/epub2go_web/settings.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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