feat: remove unused images and update email functionality
- Deleted multiple unused image files from the static media directory. - Enhanced email sending functionality by adding a new method `send_hemail` for sending HTML emails. - Updated the `enviar_correo_bienvenida` task to use the new HTML email method. - Added a new RGPD (General Data Protection Regulation) privacy policy page template. - Updated URL routing to include the new RGPD page. - Added a view function for rendering the RGPD page.
This commit is contained in:
+10
-2
@@ -1,13 +1,21 @@
|
||||
from celery import shared_task
|
||||
from django.conf import settings
|
||||
from .utilities import send_email
|
||||
from django.template.loader import render_to_string
|
||||
from .utilities import send_email, send_hemail
|
||||
from .vars import login_message, verify_message
|
||||
import random, string
|
||||
|
||||
from .models import User, VerificationCode
|
||||
@shared_task
|
||||
def enviar_correo_bienvenida(email_usuario: str, nombre_usuario: str):
|
||||
send_email(email_usuario, "Inicio de Sesión correcto", login_message.format(name = nombre_usuario))
|
||||
html_content = render_to_string(
|
||||
'emails/welcome.html',
|
||||
{
|
||||
"name": nombre_usuario
|
||||
},
|
||||
using='jinja2'
|
||||
)
|
||||
send_hemail(email_usuario, "Inicio de Sesión correcto", html_content, "Has iniciado sesión...")
|
||||
|
||||
@shared_task
|
||||
def enviar_correo_confirmacion(usuario: User):
|
||||
|
||||
Reference in New Issue
Block a user