diff --git a/bda/templates/mails-rappel-sent.html b/bda/templates/mails-rappel-sent.html index d8961aeb..3d27af48 100644 --- a/bda/templates/mails-rappel-sent.html +++ b/bda/templates/mails-rappel-sent.html @@ -10,8 +10,8 @@

Forme des mails envoyés


Une seule place

-
{{ example1 }}
+
{{ exemple_mail_1place }}

Deux places

-
{{ example2 }}
+
{{ exemple_mail_2places }}
{% endblock %} diff --git a/bda/views.py b/bda/views.py index efe82208..c5b13d9c 100644 --- a/bda/views.py +++ b/bda/views.py @@ -18,7 +18,8 @@ import time from gestioncof.decorators import cof_required, buro_required from gestioncof.shared import send_custom_mail -from bda.models import Spectacle, Participant, ChoixSpectacle, Attribution, Tirage +from bda.models import Spectacle, Participant, ChoixSpectacle, Attribution, \ + Tirage, render_template from bda.algorithm import Algorithm from bda.forms import BaseBdaFormSet, TokenForm, ResellForm @@ -341,20 +342,20 @@ def liste_spectacles_ics(request, tirage_id): def send_rappel(request, spectacle_id): # Envoi des mails show = get_object_or_404(Spectacle, id=spectacle_id) - show.send_rappel() + members = show.send_rappel() # Mails d'exemples fake_member = request.user fake_member.nb_attr = 1 - example1 = render_template('mail-rappel.txt', { + exemple_mail_1place = render_template('mail-rappel.txt', { 'member': fake_member, 'show': show}) fake_member.nb_attr = 2 - example2 = render_template('mail-rappel.txt', { + exemple_mail_2places = render_template('mail-rappel.txt', { 'member': fake_member, 'show': show}) return render(request, "mails-rappel-sent.html", { - 'members': members.values(), + 'members': members, 'show': show, - 'example1': example1, - 'example2': example2}) + 'exemple_mail_1place': exemple_mail_1place, + 'exemple_mail_2places': exemple_mail_2places})