|
|
@ -14,6 +14,7 @@ from pathlib import Path |
|
|
import os |
|
|
import os |
|
|
import logging |
|
|
import logging |
|
|
|
|
|
|
|
|
|
|
|
APP_VERSION = "11.0.2" |
|
|
|
|
|
|
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'. |
|
|
# Build paths inside the project like this: BASE_DIR / 'subdir'. |
|
|
BASE_DIR = Path(__file__).resolve().parent.parent |
|
|
BASE_DIR = Path(__file__).resolve().parent.parent |
|
|
@ -28,8 +29,8 @@ 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", "jugaralpadel.rancher.reymota.lab", "jugaralpadel.es"] |
|
|
|
|
|
CSRF_TRUSTED_ORIGINS = ["https://*.ocp-cluster.reymota.lab", "http://jugaralpadel.rancher.reymota.lab", " https://jugaralpadel.rancher.reymota.lab", " https://jugaralpadel.es"] |
|
|
|
|
|
|
|
|
# Application definition |
|
|
# Application definition |
|
|
|
|
|
|
|
|
@ -71,6 +72,7 @@ TEMPLATES = [ |
|
|
'django.template.context_processors.request', |
|
|
'django.template.context_processors.request', |
|
|
'django.contrib.auth.context_processors.auth', |
|
|
'django.contrib.auth.context_processors.auth', |
|
|
'django.contrib.messages.context_processors.messages', |
|
|
'django.contrib.messages.context_processors.messages', |
|
|
|
|
|
'gestion_reservas.context_processors.app_version', |
|
|
], |
|
|
], |
|
|
'libraries': { |
|
|
'libraries': { |
|
|
'filtros_de_entorno': 'gestion_reservas.templatetags.filtros_de_entorno', |
|
|
'filtros_de_entorno': 'gestion_reservas.templatetags.filtros_de_entorno', |
|
|
@ -87,16 +89,15 @@ 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", |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Password validation |
|
|
# Password validation |
|
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators |
|
|
# https://docs.djangoproject.com/en/5.1/ref/settings/#auth-password-validators |
|
|
|
|
|
|
|
|
@ -152,11 +153,6 @@ AUTH_USER_MODEL = "reymotausers.ReyMotaUser" |
|
|
MEDIA_ROOT = BASE_DIR / "mediafiles" |
|
|
MEDIA_ROOT = BASE_DIR / "mediafiles" |
|
|
MEDIA_URL = '/media/' |
|
|
MEDIA_URL = '/media/' |
|
|
|
|
|
|
|
|
if DEBUG is False: |
|
|
|
|
|
CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS").split(" ") |
|
|
|
|
|
|
|
|
|
|
|
CSRF_TRUSTED_ORIGINS = os.environ.get("CSRF_TRUSTED_ORIGINS").split(" ") |
|
|
|
|
|
|
|
|
|
|
|
# Configuración de correo con Gmail |
|
|
# Configuración de correo con Gmail |
|
|
if DEBUG is True: |
|
|
if DEBUG is True: |
|
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
|
|
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
|
|
|