|
|
|
|
@ -10,7 +10,17 @@ For the full list of settings and their values, see
@@ -10,7 +10,17 @@ For the full list of settings and their values, see
|
|
|
|
|
https://docs.djangoproject.com/en/5.2/ref/settings/ |
|
|
|
|
""" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from pathlib import Path |
|
|
|
|
import os |
|
|
|
|
|
|
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'. |
|
|
|
|
BASE_DIR = Path(__file__).resolve().parent.parent |
|
|
|
|
|
|
|
|
|
from dotenv import load_dotenv |
|
|
|
|
# Load environment variables from conf.env |
|
|
|
|
load_dotenv(BASE_DIR / 'conf.env') |
|
|
|
|
|
|
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'. |
|
|
|
|
|
|
|
|
|
@ -21,13 +31,17 @@ STATIC_ROOT = BASE_DIR / 'staticfiles'
@@ -21,13 +31,17 @@ STATIC_ROOT = BASE_DIR / 'staticfiles'
|
|
|
|
|
# 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! |
|
|
|
|
SECRET_KEY = 'django-insecure-(norsp!z18z298=sociz_3n57ml+u2$%hmsphkk_udgg*414#*' |
|
|
|
|
SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', 'django-insecure-(norsp!z18z298=sociz_3n57ml+u2$%hmsphkk_udgg*414#*') |
|
|
|
|
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY', '') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# SECURITY WARNING: don't run with debug turned on in production! |
|
|
|
|
DEBUG = True |
|
|
|
|
DEBUG = os.getenv('DJANGO_DEBUG', 'True') == 'True' |
|
|
|
|
|
|
|
|
|
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '192.168.0.14'] |
|
|
|
|
ALLOWED_HOSTS = os.getenv('DJANGO_ALLOWED_HOSTS', 'localhost,127.0.0.1').split(',') |
|
|
|
|
CSRF_TRUSTED_ORIGINS = os.getenv('DJANGO_CSRF_TRUSTED_ORIGINS', 'http://localhost,http://127.0.0.1').split(',') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Application definition |
|
|
|
|
|