From 2a28e3c9085d8615587b456b513515dbd911dfbf Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Sat, 31 Aug 2024 19:52:18 +0200 Subject: [PATCH] =?UTF-8?q?Arreglo=20para=20que=20se=20vean=20las=20im?= =?UTF-8?q?=C3=A1genes=20en=20producci=C3=B3n=20con=20debug=20=3D=20true?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Libros/K8S/Makefile | 2 +- Libros/biblioteca/biblioteca/settings.py | 5 +++-- Libros/biblioteca/biblioteca/urls.py | 2 +- Libros/biblioteca/gestion/templates/_cabecera.html | 2 +- RepostajesDj/K8S/Makefile | 2 +- RepostajesDj/vehiculos/repostajes/templates/_cabecera.html | 2 +- RepostajesDj/vehiculos/vehiculos/settings.py | 3 ++- RepostajesDj/vehiculos/vehiculos/urls.py | 2 +- 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Libros/K8S/Makefile b/Libros/K8S/Makefile index c154379..6ee8d52 100644 --- a/Libros/K8S/Makefile +++ b/Libros/K8S/Makefile @@ -1,5 +1,5 @@ export ARQUITECTURA := $(shell lscpu |grep itectur | tr -d ' '| cut -f2 -d':') -export IMG_VERSION = 1.43 +export IMG_VERSION = 1.46 export IMG_NGINX_VERSION = 1.17 # limpia todo diff --git a/Libros/biblioteca/biblioteca/settings.py b/Libros/biblioteca/biblioteca/settings.py index b027377..da908bc 100644 --- a/Libros/biblioteca/biblioteca/settings.py +++ b/Libros/biblioteca/biblioteca/settings.py @@ -27,7 +27,7 @@ SECRET_KEY = os.environ.get("SECRET_KEY") # SECURITY WARNING: don't run with debug turned on in production! # DEBUG = True -DEBUG = bool(os.environ.get("DEBUG", default=0)) +DEBUG = os.environ["DEBUG"] == 'True' ALLOWED_HOSTS = os.environ.get("DJANGO_ALLOWED_HOSTS").split(" ") @@ -141,7 +141,8 @@ LOGOUT_REDIRECT_URL = 'principal' AUTH_USER_MODEL = "gestion.ReyMotaUser" -MEDIA_ROOT = os.path.join(BASE_DIR, 'mediafiles/') +MEDIA_ROOT = BASE_DIR / "mediafiles" +MEDIA_URL = '/media/' LOGGING = { diff --git a/Libros/biblioteca/biblioteca/urls.py b/Libros/biblioteca/biblioteca/urls.py index 691645c..41b5d59 100644 --- a/Libros/biblioteca/biblioteca/urls.py +++ b/Libros/biblioteca/biblioteca/urls.py @@ -35,6 +35,6 @@ urlpatterns = [ ] -if settings.DEBUG: +if not settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/Libros/biblioteca/gestion/templates/_cabecera.html b/Libros/biblioteca/gestion/templates/_cabecera.html index ecd9c48..b924063 100644 --- a/Libros/biblioteca/gestion/templates/_cabecera.html +++ b/Libros/biblioteca/gestion/templates/_cabecera.html @@ -15,7 +15,7 @@