Add a link to the "bda-rappel" mail edition page
This commit is contained in:
parent
4fce1e8afc
commit
5c11893059
|
@ -24,6 +24,15 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr \>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<em>Note :</em> le template de ce mail peut être modifié à
|
||||||
|
<a href="{% url 'admin:custommail_custommail_change' custommail_id %}">cette adresse</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<hr \>
|
||||||
|
|
||||||
<h3>Forme des mails</h3>
|
<h3>Forme des mails</h3>
|
||||||
|
|
||||||
<h4>Une seule place</h4>
|
<h4>Une seule place</h4>
|
||||||
|
@ -35,4 +44,5 @@
|
||||||
{% for part in exemple_mail_2places %}
|
{% for part in exemple_mail_2places %}
|
||||||
<pre>{{ part }}</pre>
|
<pre>{{ part }}</pre>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
14
bda/views.py
14
bda/views.py
|
@ -9,6 +9,7 @@ from datetime import timedelta
|
||||||
from custommail.shortcuts import (
|
from custommail.shortcuts import (
|
||||||
send_mass_custom_mail, send_custom_mail, render_custom_mail
|
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.shortcuts import render, get_object_or_404
|
||||||
from django.contrib.auth.decorators import login_required
|
from django.contrib.auth.decorators import login_required
|
||||||
from django.contrib import messages
|
from django.contrib import messages
|
||||||
|
@ -662,9 +663,18 @@ def send_rappel(request, spectacle_id):
|
||||||
'nb_attr': 2
|
'nb_attr': 2
|
||||||
})
|
})
|
||||||
# Contexte
|
# Contexte
|
||||||
ctxt = {'show': show,
|
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_1place': exemple_mail_1place,
|
||||||
'exemple_mail_2places': exemple_mail_2places}
|
'exemple_mail_2places': exemple_mail_2places,
|
||||||
|
'custommail_id': custommail_id,
|
||||||
|
}
|
||||||
# Envoi confirmé
|
# Envoi confirmé
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
members = show.send_rappel()
|
members = show.send_rappel()
|
||||||
|
|
Loading…
Reference in a new issue