From 8f3cbbd72b326df9786eec5821e7b2c0c3a23366 Mon Sep 17 00:00:00 2001 From: pedro Date: Thu, 7 Mar 2024 15:11:30 +0100 Subject: [PATCH] refactor text and vars when sending email I intended to clarify and fix typos --- idhub/management/commands/send_mail_admins.py | 3 ++- .../idhub/admin/registration/start_app_admin_email.html | 6 +++--- .../idhub/admin/registration/start_app_admin_email.txt | 8 ++++---- .../idhub/admin/registration/start_app_admin_subject.txt | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/idhub/management/commands/send_mail_admins.py b/idhub/management/commands/send_mail_admins.py index a878456..ea3b790 100644 --- a/idhub/management/commands/send_mail_admins.py +++ b/idhub/management/commands/send_mail_admins.py @@ -29,7 +29,8 @@ class Command(BaseCommand): """ url_domain = "https://{}/".format(settings.DOMAIN) context = { - "domain": url_domain, + "domain": settings.DOMAIN, + "url_domain": url_domain, } subject = loader.render_to_string(self.subject_template_name, context) # Email subject *must not* contain newlines diff --git a/idhub/templates/idhub/admin/registration/start_app_admin_email.html b/idhub/templates/idhub/admin/registration/start_app_admin_email.html index 15bd8ad..6902bee 100644 --- a/idhub/templates/idhub/admin/registration/start_app_admin_email.html +++ b/idhub/templates/idhub/admin/registration/start_app_admin_email.html @@ -1,9 +1,9 @@ -Hola, se ha reiniciado el servicio de Idhub: {{ domain }} +Hola, se ha reiniciado el servicio de Idhub: {{ url_domain }}
-no será plenamente funcional hasta que no introduzcas la contraseña de encriptacion del sistema. +no será plenamente funcional hasta que no introduzcas la contraseña de cifrado del sistema.

-Por favor entra en la aplicacion como administrador y añade esta contraseña. +Por favor entra en la aplicación como administrador y reintroduce esta contraseña.
Muchas gracias diff --git a/idhub/templates/idhub/admin/registration/start_app_admin_email.txt b/idhub/templates/idhub/admin/registration/start_app_admin_email.txt index ba23523..6095ee0 100644 --- a/idhub/templates/idhub/admin/registration/start_app_admin_email.txt +++ b/idhub/templates/idhub/admin/registration/start_app_admin_email.txt @@ -1,7 +1,7 @@ -Hola, se ha reiniciado el servicio de Idhub: {{ domain }} -no será plenamente funcional hasta que no introduzcas la contraseña de encriptacion del sistema. +Hola, se ha reiniciado el servicio de Idhub: {{ url_domain }} +no será plenamente funcional hasta que no introduzcas la contraseña de cifrado del sistema. -Por favor entra en la aplicacion como administrador y añade esta contraseña. +Por favor entra en la aplicación como administrador y reintroduce esta contraseña. Muchas gracias - + diff --git a/idhub/templates/idhub/admin/registration/start_app_admin_subject.txt b/idhub/templates/idhub/admin/registration/start_app_admin_subject.txt index 47a9ea7..b71b18e 100644 --- a/idhub/templates/idhub/admin/registration/start_app_admin_subject.txt +++ b/idhub/templates/idhub/admin/registration/start_app_admin_subject.txt @@ -1 +1 @@ -Reinicio de IdHub +Reestablecer {{ domain }}