From 2e58b98f041fdf91dd8249a6f6fe01f40289760f Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Mon, 12 Aug 2024 16:01:44 +0200 Subject: [PATCH] Cambios en branding y otros menores --- Libros/Pipfile.lock | 6 +++--- Libros/biblioteca/.env | 1 - Libros/biblioteca/biblioteca/settings.py | 4 ++-- Libros/biblioteca/gestion/forms.py | 1 + Libros/biblioteca/gestion/templates/_branding.html | 4 +++- .../gestion/templates/registration/signup.html | 2 +- Libros/biblioteca/gestion/templatetags/__init__.py | 0 .../gestion/templatetags/filtros_de_entorno.py | 11 +++++++++++ .../servicios/repostajes/templates/_branding.html | 2 +- 9 files changed, 22 insertions(+), 9 deletions(-) delete mode 100644 Libros/biblioteca/.env create mode 100644 Libros/biblioteca/gestion/templatetags/__init__.py create mode 100644 Libros/biblioteca/gestion/templatetags/filtros_de_entorno.py diff --git a/Libros/Pipfile.lock b/Libros/Pipfile.lock index 1944333..99c0036 100644 --- a/Libros/Pipfile.lock +++ b/Libros/Pipfile.lock @@ -26,12 +26,12 @@ }, "django": { "hashes": [ - "sha256:bd4505cae0b9bd642313e8fb71810893df5dc2ffcacaa67a33af2d5cd61888f2", - "sha256:f216510ace3de5de01329463a315a629f33480e893a9024fc93d8c32c22913da" + "sha256:848a5980e8efb76eea70872fb0e4bc5e371619c70fffbe48e3e1b50b2c09455d", + "sha256:d3b811bf5371a26def053d7ee42a9df1267ef7622323fe70a601936725aa4557" ], "index": "pypi", "markers": "python_version >= '3.10'", - "version": "==5.0.7" + "version": "==5.1" }, "django-db": { "hashes": [ diff --git a/Libros/biblioteca/.env b/Libros/biblioteca/.env deleted file mode 100644 index d53e27c..0000000 --- a/Libros/biblioteca/.env +++ /dev/null @@ -1 +0,0 @@ -VERSION=1.0 diff --git a/Libros/biblioteca/biblioteca/settings.py b/Libros/biblioteca/biblioteca/settings.py index 202fd4a..4271d96 100644 --- a/Libros/biblioteca/biblioteca/settings.py +++ b/Libros/biblioteca/biblioteca/settings.py @@ -105,9 +105,9 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/5.0/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'es-es' -TIME_ZONE = 'UTC' +TIME_ZONE = 'Europe/Madrid' USE_I18N = True diff --git a/Libros/biblioteca/gestion/forms.py b/Libros/biblioteca/gestion/forms.py index 9092ba2..103bb90 100644 --- a/Libros/biblioteca/gestion/forms.py +++ b/Libros/biblioteca/gestion/forms.py @@ -32,6 +32,7 @@ class ReyMotaUserCreationForm(UserCreationForm): class Meta: model = ReyMotaUser fields = ("email", "nombre", "foto") + labels = {'email': 'Dirección de correo'} class ReyMotaUserChangeForm(UserChangeForm): diff --git a/Libros/biblioteca/gestion/templates/_branding.html b/Libros/biblioteca/gestion/templates/_branding.html index 2e9653d..0c08c5b 100644 --- a/Libros/biblioteca/gestion/templates/_branding.html +++ b/Libros/biblioteca/gestion/templates/_branding.html @@ -1,6 +1,8 @@ {% load static %} +{% load filtros_de_entorno %} +
- +
\ No newline at end of file diff --git a/Libros/biblioteca/gestion/templates/registration/signup.html b/Libros/biblioteca/gestion/templates/registration/signup.html index 17a1873..19222d6 100644 --- a/Libros/biblioteca/gestion/templates/registration/signup.html +++ b/Libros/biblioteca/gestion/templates/registration/signup.html @@ -7,7 +7,7 @@
{% include "_branding.html" %} -

Registrarse en Lyrics

+

Registrarse en Libros

diff --git a/Libros/biblioteca/gestion/templatetags/__init__.py b/Libros/biblioteca/gestion/templatetags/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/Libros/biblioteca/gestion/templatetags/filtros_de_entorno.py b/Libros/biblioteca/gestion/templatetags/filtros_de_entorno.py new file mode 100644 index 0000000..15058a1 --- /dev/null +++ b/Libros/biblioteca/gestion/templatetags/filtros_de_entorno.py @@ -0,0 +1,11 @@ +import os +from django import template + +register = template.Library() + +@register.filter +def muestra_version(clave): + print("muestra_valor: ", clave) + + print("muestra_valor: ", os.getenv(clave)) + return os.getenv(clave, '') diff --git a/RepostajesPy/servicios/repostajes/templates/_branding.html b/RepostajesPy/servicios/repostajes/templates/_branding.html index eae343c..bf2cbc2 100644 --- a/RepostajesPy/servicios/repostajes/templates/_branding.html +++ b/RepostajesPy/servicios/repostajes/templates/_branding.html @@ -1,3 +1,3 @@ \ No newline at end of file