Added api and other settings
This commit is contained in:
parent
0809bdc70a
commit
81bed38ada
1 changed files with 1 additions and 8 deletions
|
|
@ -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()]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue