Browse Source

Variables de entorno directamente en settings.py

main
Celestino Rey 10 months ago
parent
commit
b433793861
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      gestion_reservas/gestion_reservas/settings.py

+ 8
- 8
gestion_reservas/gestion_reservas/settings.py View File

@ -26,7 +26,7 @@ SECRET_KEY = 'hey'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = os.environ["DEBUG"] == 'True' DEBUG = os.environ["DEBUG"] == 'True'
ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS").split(" ")
ALLOWED_HOSTS = ".ocp-cluster.reymota.lab"
# Application definition # Application definition
@ -85,12 +85,12 @@ WSGI_APPLICATION = 'gestion_reservas.wsgi.application'
DATABASES = { DATABASES = {
"default": { "default": {
"ENGINE": os.environ.get("SQL_ENGINE", "django.db.backends.sqlite3"),
"NAME": os.environ.get("SQL_DATABASE", BASE_DIR / "db.sqlite3"),
"USER": os.environ.get("SQL_USER", "user"),
"PASSWORD": os.environ.get("SQL_PASSWORD", "password"),
"HOST": os.environ.get("SQL_HOST", "localhost"),
"PORT": os.environ.get("SQL_PORT", "5432"),
"ENGINE": "django.db.backends.postgresql",
"NAME": "jugaralpadel",
"USER": "creylopez",
"PASSWORD": "Dsa-0213",
"HOST": "postgresql",
"PORT": "5432",
} }
} }
@ -149,7 +149,7 @@ AUTH_USER_MODEL = "reymotausers.ReyMotaUser"
MEDIA_ROOT = BASE_DIR / "media" MEDIA_ROOT = BASE_DIR / "media"
MEDIA_URL = '/media/' MEDIA_URL = '/media/'
CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS").split(" ")
CSRF_TRUSTED_ORIGINS = "https://*.ocp-cluster.reymota.lab"
# Configuración de correo con Gmail # Configuración de correo con Gmail
if DEBUG is True: if DEBUG is True:


Loading…
Cancel
Save