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 @@