From 10d36350fe1ae9b06e74e545ac5e26aa0ae58d03 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Thu, 6 Mar 2025 12:18:10 +0100 Subject: [PATCH] =?UTF-8?q?Cambio=20forma=20de=20mostrar=20la=20versi?= =?UTF-8?q?=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/gestion_reservas/context_processors.py | 6 ++++++ src/gestion_reservas/settings.py | 3 +++ src/templates/_branding.html | 9 ++------- 3 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 src/gestion_reservas/context_processors.py diff --git a/src/gestion_reservas/context_processors.py b/src/gestion_reservas/context_processors.py new file mode 100644 index 0000000..f5998a5 --- /dev/null +++ b/src/gestion_reservas/context_processors.py @@ -0,0 +1,6 @@ +from django.conf import settings + +def app_version(request): + return { + 'APP_VERSION': settings.APP_VERSION + } diff --git a/src/gestion_reservas/settings.py b/src/gestion_reservas/settings.py index a8ca541..4e697b1 100644 --- a/src/gestion_reservas/settings.py +++ b/src/gestion_reservas/settings.py @@ -14,6 +14,8 @@ from pathlib import Path import os import logging +APP_VERSION = "11.0.2" + # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent @@ -70,6 +72,7 @@ TEMPLATES = [ 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', + 'gestion_reservas.context_processors.app_version', ], 'libraries': { 'filtros_de_entorno': 'gestion_reservas.templatetags.filtros_de_entorno', diff --git a/src/templates/_branding.html b/src/templates/_branding.html index 382697c..f3b9489 100644 --- a/src/templates/_branding.html +++ b/src/templates/_branding.html @@ -3,12 +3,7 @@ {% load filtros_de_entorno %}
- +