allowed settings from environment.
This commit is contained in:
parent
4bb7f464e3
commit
99e1198819
@ -9,6 +9,7 @@ https://docs.djangoproject.com/en/5.0/topics/settings/
|
||||
For the full list of settings and their values, see
|
||||
https://docs.djangoproject.com/en/5.0/ref/settings/
|
||||
"""
|
||||
import os
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
@ -20,14 +21,18 @@ BASE_DIR = Path(__file__).resolve().parent.parent
|
||||
# See https://docs.djangoproject.com/en/5.0/howto/deployment/checklist/
|
||||
|
||||
# SECURITY WARNING: keep the secret key used in production secret!
|
||||
SECRET_KEY = 'django-insecure-zh6rinl@8y7g(cf781snisx2j%p^c#d&b2@@9cqe!v@4yv8x=v'
|
||||
SECRET_KEY = os.environ.get(
|
||||
"SECRET_KEY",
|
||||
"django-insecure-zh6rinl@8y7g(cf781snisx2j%p^c#d&b2@@9cqe!v@4yv8x=v"
|
||||
)
|
||||
|
||||
# SECURITY WARNING: don't run with debug turned on in production!
|
||||
DEBUG = True
|
||||
DEBUG = True if os.environ.get("DEBUG", 'False') in ['True', '1'] else False
|
||||
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', 'localhost').split(',')
|
||||
|
||||
ALLOWED_HOSTS = ['localhost']
|
||||
|
||||
CORS_ALLOWED_ORIGINS = ['http://localhost:3000', 'http://localhost:7001']
|
||||
CORS_ALLOWED_ORIGINS = os.environ.get(
|
||||
'CORS_ALLOWED_ORIGINS',
|
||||
'http://localhost:3000,http://localhost:7001').split(',')
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
|
Loading…
Reference in New Issue
Block a user