Skip to content

Commit

Permalink
refactor: Restore configuration for DEBUG and ALLOWED_HOSTS using dec…
Browse files Browse the repository at this point in the history
…ouple
  • Loading branch information
AhmedNassar7 committed Dec 25, 2024
1 parent 9879103 commit 8439552
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions egypt_metro/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from dotenv import load_dotenv # Load environment variables from .env file
from datetime import timedelta # Time delta for JWT tokens
from corsheaders.defaults import default_headers # Default headers for CORS
# from decouple import config # Configuration helper
from decouple import config # Configuration helper
from datetime import datetime # Date and time utilities

# Build paths inside the project like this: BASE_DIR / 'subdir'.
Expand All @@ -31,10 +31,8 @@

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv("SECRET_KEY") # Secret key for Django
# DEBUG = os.getenv("DEBUG", "False") == "True" # Default to False
# ALLOWED_HOSTS = config("ALLOWED_HOSTS", default="").split(",")
DEBUG = True
ALLOWED_HOSTS = ['*']
DEBUG = os.getenv("DEBUG", "False") == "True" # Default to False
ALLOWED_HOSTS = config("ALLOWED_HOSTS", default="").split(",")
BASE_URL = os.getenv("BASE_URL") # Base URL for the project
JWT_SECRET = os.getenv("JWT_SECRET") # Secret key for JWT tokens
CSRF_TRUSTED_ORIGINS = ["https://backend-54v5.onrender.com"]
Expand Down

0 comments on commit 8439552

Please sign in to comment.