diff --git a/manage.py b/manage.py index 9890802..778d6ef 100755 --- a/manage.py +++ b/manage.py @@ -7,7 +7,6 @@ def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'smartreport.settings') - os.environ.setdefault('DEBUG', "False" if f'{os.environ.get("DEBUG")}'.lower() == 'false' else "True") try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/smartreport/settings.py b/smartreport/settings.py index 59d03f0..4a10e00 100644 --- a/smartreport/settings.py +++ b/smartreport/settings.py @@ -20,11 +20,8 @@ BASE_DIR = Path(__file__).resolve().parent.parent -# Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = "django-insecure-uji3*2a6x#!jcvjy9ogvgoo5h6jb=$au1w)1*u1yk!6$+z#obj" +os.environ.setdefault('DEBUG', "True") +os.environ.setdefault('SECRET_KEY', "django-insecure-uji3*2a6x#!jcvjy9ogvgoo5h6jb=$au1w)1*u1yk!6$+z#obj") ALLOWED_HOSTS = [ @@ -95,7 +92,7 @@ # Database # https://docs.djangoproject.com/en/4.2/ref/settings/#databases -if os.environ.get("DEBUG"): +if os.environ.get("DEBUG").lower() == "true": DATABASES = { "default": { "ENGINE": "django.db.backends.sqlite3",