SWE574-Fall2023-Group1 / SWE574-Fall2023-G1

Project for SWE 574 - Group 1
MIT License
7 stars 1 forks source link

Django Debug Mode #157

Closed sadikkuzu closed 11 months ago

sadikkuzu commented 11 months ago

We may handle DEBUG value as an environment value from our .env file:


before

https://github.com/SWE574-Fall2023-Group1/SWE574-Fall2023-G1/blob/cd40dcecb37af5a6d169987d05bdbdc7e635a0ef/backend/backend/settings.py#L31-L35

https://github.com/SWE574-Fall2023-Group1/SWE574-Fall2023-G1/blob/30b205557c33461460221918c7ef404d97401c2b/backend/backend/.env.sample#L13-L14


after

BACKEND_HOST_IP=localhost 
DJANGO_LOG_LEVEL=WARNING  # DEBUG, INFO, WARNING, ERROR, CRITICAL 
DJANGO_DEBUG=true  # false, for prod environment
# SECURITY WARNING: keep the secret key used in production secret! 
SECRET_KEY = env("SECRET_KEY") 

# SECURITY WARNING: don't run with debug turned on in production! 
DEBUG = (env("DJANGO_DEBUG", default="true").lower() == "true")