diff --git a/bda/templates/bda/mails-rappel.html b/bda/templates/bda/mails-rappel.html index 21fcc407..342b24a6 100644 --- a/bda/templates/bda/mails-rappel.html +++ b/bda/templates/bda/mails-rappel.html @@ -23,6 +23,15 @@ {% endif %} + +
+ +

+ Note : le template de ce mail peut être modifié à + cette adresse +

+ +

Forme des mails

@@ -35,4 +44,5 @@ {% for part in exemple_mail_2places %}
{{ part }}
{% endfor %} + {% endblock %} diff --git a/bda/views.py b/bda/views.py index 75716ba5..2149594a 100644 --- a/bda/views.py +++ b/bda/views.py @@ -9,6 +9,7 @@ from datetime import timedelta from custommail.shortcuts import ( send_mass_custom_mail, send_custom_mail, render_custom_mail ) +from custommail.models import CustomMail from django.shortcuts import render, get_object_or_404 from django.contrib.auth.decorators import login_required from django.contrib import messages @@ -662,9 +663,18 @@ def send_rappel(request, spectacle_id): 'nb_attr': 2 }) # Contexte - ctxt = {'show': show, - 'exemple_mail_1place': exemple_mail_1place, - 'exemple_mail_2places': exemple_mail_2places} + custommail_id = ( + CustomMail.objects + .filter(shortname="bda-rappel") + .values_list("id", flat=True) + [0] + ) + ctxt = { + 'show': show, + 'exemple_mail_1place': exemple_mail_1place, + 'exemple_mail_2places': exemple_mail_2places, + 'custommail_id': custommail_id, + } # Envoi confirmé if request.method == 'POST': members = show.send_rappel()