substitui valores por variáveis de ambiente

This commit is contained in:
2025-06-30 13:23:03 -04:00
parent 28b12c5ab9
commit 6e8e24caeb
2 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,7 @@ if READ_DOT_ENV_FILE:
# GENERAL
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = env.bool("DJANGO_DEBUG", False)
DEBUG = env.bool("DJANGO_DEBUG", True)
# Local time zone. Choices are
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# though not all of them may be available with every OS.
@ -177,6 +177,7 @@ TEMPLATES = [
"APP_DIRS": True,
"OPTIONS": {
# https://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors
"string_if_invalid": "INVALID_TEMPLATE_VAR",
"context_processors": [
"django.template.context_processors.debug",
"django.template.context_processors.request",
@ -210,10 +211,7 @@ FIXTURE_DIRS = (str(APPS_DIR / "fixtures"),)
SESSION_COOKIE_HTTPONLY = True
# https://docs.djangoproject.com/en/dev/ref/settings/#csrf-cookie-httponly
CSRF_COOKIE_HTTPONLY = True
CSRF_TRUSTED_ORIGINS = [
'http://localhost',
'http://192.168.235.234',
]
CSRF_TRUSTED_ORIGINS = env.list("DJANGO_CSRF_TRUSTED_ORIGINS")
# https://docs.djangoproject.com/en/dev/ref/settings/#x-frame-options
X_FRAME_OPTIONS = "DENY"
@ -298,7 +296,7 @@ ELASTICSEARCH_PASSWORD = env.str("ELASTICSEARCH_PASSWORD")
ELASTICSEARCH_DSL = {
"default": {
"hosts": "http://elasticsearch:9200",
"timeout": 60,
"timeout": 600,
"http_auth": (
ELASTICSEARCH_USER,
ELASTICSEARCH_PASSWORD,
@ -347,3 +345,5 @@ ELASTICSEARCH_INDEX_SETTINGS = {
},
},
}
API_BASE_URL = env.str("DJANGO_API_BASE_URL")

View File

@ -13,7 +13,7 @@ SECRET_KEY = env(
"DJANGO_SECRET_KEY",
)
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1", "192.168.235.234"] # noqa: S104
ALLOWED_HOSTS = env.list("DJANGO_ALLOWED_HOSTS")
# CACHES
# ------------------------------------------------------------------------------