diff --git a/bda/templates/bda/mails-rappel.html b/bda/templates/bda/mails-rappel.html
index 342b24a6..c10503b0 100644
--- a/bda/templates/bda/mails-rappel.html
+++ b/bda/templates/bda/mails-rappel.html
@@ -28,7 +28,7 @@
Note : le template de ce mail peut être modifié à
- cette adresse
+ cette adresse
diff --git a/bda/views.py b/bda/views.py
index 2149594a..d6da2e9f 100644
--- a/bda/views.py
+++ b/bda/views.py
@@ -6,9 +6,7 @@ import hashlib
import time
import json
from datetime import timedelta
-from custommail.shortcuts import (
- send_mass_custom_mail, send_custom_mail, render_custom_mail
-)
+from custommail.shortcuts import send_mass_custom_mail, send_custom_mail
from custommail.models import CustomMail
from django.shortcuts import render, get_object_or_404
from django.contrib.auth.decorators import login_required
@@ -652,28 +650,23 @@ def unpaid(request, tirage_id):
def send_rappel(request, spectacle_id):
show = get_object_or_404(Spectacle, id=spectacle_id)
# Mails d'exemples
- exemple_mail_1place = render_custom_mail('bda-rappel', {
+ custommail = CustomMail.objects.get(shortname="bda-rappel")
+ exemple_mail_1place = custommail.render({
'member': request.user,
'show': show,
'nb_attr': 1
})
- exemple_mail_2places = render_custom_mail('bda-rappel', {
+ exemple_mail_2places = custommail.render({
'member': request.user,
'show': show,
'nb_attr': 2
})
# Contexte
- 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,
+ 'custommail': custommail,
}
# Envoi confirmé
if request.method == 'POST':