Added api and other settings

This commit is contained in:
Viswamedha Nalabotu 2025-11-19 12:55:56 +00:00
parent 0809bdc70a
commit 81bed38ada

View file

@ -9,20 +9,13 @@ from dotenv import load_dotenv
load_dotenv(dotenv_path = BASE_DIR / '.env') load_dotenv(dotenv_path = BASE_DIR / '.env')
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/5.2/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
# Prefer setting `DJANGO_SECRET_KEY` in the repository `.env` file or in
# the deployment environment. A fallback is kept for local convenience.
SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', 'django-insecure-pf#9a$@vq1o91n#mxwba_dm-+v9&*u4f3$#bts%zanu-$0*whk') SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', 'django-insecure-pf#9a$@vq1o91n#mxwba_dm-+v9&*u4f3$#bts%zanu-$0*whk')
# SECURITY WARNING: don't run with debug turned on in production!
# Set `DJANGO_DEBUG=false` in production environments.
_debug_env = os.getenv('DJANGO_DEBUG', 'True') _debug_env = os.getenv('DJANGO_DEBUG', 'True')
DEBUG = str(_debug_env).lower() in ('1', 'true', 'yes', 'on') DEBUG = str(_debug_env).lower() in ('1', 'true', 'yes', 'on')
# ALLOWED_HOSTS can be provided as a comma-separated list in `DJANGO_ALLOWED_HOSTS`.
_hosts = os.getenv('DJANGO_ALLOWED_HOSTS', '') _hosts = os.getenv('DJANGO_ALLOWED_HOSTS', '')
ALLOWED_HOSTS = [h.strip() for h in _hosts.split(',') if h.strip()] ALLOWED_HOSTS = [h.strip() for h in _hosts.split(',') if h.strip()]