Renomme les variables example{1,2}
This commit is contained in:
parent
22b30fe87a
commit
dc7f077ced
2 changed files with 10 additions and 9 deletions
|
@ -10,8 +10,8 @@
|
||||||
<h3>Forme des mails envoyés</h3>
|
<h3>Forme des mails envoyés</h3>
|
||||||
|
|
||||||
<br />Une seule place<br /><br />
|
<br />Une seule place<br /><br />
|
||||||
<pre>{{ example1 }}</pre>
|
<pre>{{ exemple_mail_1place }}</pre>
|
||||||
|
|
||||||
<br />Deux places<br /><br />
|
<br />Deux places<br /><br />
|
||||||
<pre>{{ example2 }}</pre>
|
<pre>{{ exemple_mail_2places }}</pre>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
15
bda/views.py
15
bda/views.py
|
@ -18,7 +18,8 @@ import time
|
||||||
|
|
||||||
from gestioncof.decorators import cof_required, buro_required
|
from gestioncof.decorators import cof_required, buro_required
|
||||||
from gestioncof.shared import send_custom_mail
|
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.algorithm import Algorithm
|
||||||
|
|
||||||
from bda.forms import BaseBdaFormSet, TokenForm, ResellForm
|
from bda.forms import BaseBdaFormSet, TokenForm, ResellForm
|
||||||
|
@ -341,20 +342,20 @@ def liste_spectacles_ics(request, tirage_id):
|
||||||
def send_rappel(request, spectacle_id):
|
def send_rappel(request, spectacle_id):
|
||||||
# Envoi des mails
|
# Envoi des mails
|
||||||
show = get_object_or_404(Spectacle, id=spectacle_id)
|
show = get_object_or_404(Spectacle, id=spectacle_id)
|
||||||
show.send_rappel()
|
members = show.send_rappel()
|
||||||
# Mails d'exemples
|
# Mails d'exemples
|
||||||
fake_member = request.user
|
fake_member = request.user
|
||||||
fake_member.nb_attr = 1
|
fake_member.nb_attr = 1
|
||||||
example1 = render_template('mail-rappel.txt', {
|
exemple_mail_1place = render_template('mail-rappel.txt', {
|
||||||
'member': fake_member,
|
'member': fake_member,
|
||||||
'show': show})
|
'show': show})
|
||||||
fake_member.nb_attr = 2
|
fake_member.nb_attr = 2
|
||||||
example2 = render_template('mail-rappel.txt', {
|
exemple_mail_2places = render_template('mail-rappel.txt', {
|
||||||
'member': fake_member,
|
'member': fake_member,
|
||||||
'show': show})
|
'show': show})
|
||||||
return render(request, "mails-rappel-sent.html", {
|
return render(request, "mails-rappel-sent.html", {
|
||||||
'members': members.values(),
|
'members': members,
|
||||||
'show': show,
|
'show': show,
|
||||||
'example1': example1,
|
'exemple_mail_1place': exemple_mail_1place,
|
||||||
'example2': example2})
|
'exemple_mail_2places': exemple_mail_2places})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue