Skip to content

Commit

Permalink
Add DEBUG from .env
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSuncatcher222 committed Nov 26, 2023
1 parent 3832651 commit 2df50c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions backend/urban_utopia_2024/app_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@

load_dotenv(os.path.join(BASE_DIR, '.env'), verbose=True)

DEBUG = os.getenv('DB_ENGINE')
if DEBUG == 'True':
DEBUG: bool = True
else:
DEBUG: bool = False


"""Django data."""

Expand Down
4 changes: 2 additions & 2 deletions backend/urban_utopia_2024/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from urban_utopia_2024.app_data import (
AUTH_TOKEN, AUTH_JWT,
BASE_DIR,
BASE_DIR, DEBUG,
DATABASE_SQLITE, DATABASE_POSTGRESQL,
DEFAULT_FROM_EMAIL,
EMAIL_HOST, EMAIL_PORT, EMAIL_HOST_USER, EMAIL_HOST_PASSWORD,
Expand All @@ -18,7 +18,7 @@
"""App settings."""


DEBUG = False
DEBUG = DEBUG

AUTH_TYPE: str = AUTH_TOKEN

Expand Down

0 comments on commit 2df50c9

Please sign in to comment.