Finish task

This commit is contained in:
Tom Hubrecht 2021-06-20 12:53:55 +02:00
parent 867f8f86d6
commit 3438b32749
2 changed files with 10 additions and 2 deletions

View file

@ -8,6 +8,5 @@ from .utils import send_mail
def send_election_mail(election_pk, subject, body, reply_to): def send_election_mail(election_pk, subject, body, reply_to):
election = Election.objects.get(pk=election_pk) election = Election.objects.get(pk=election_pk)
send_mail(election, subject, body, reply_to) send_mail(election, subject, body, reply_to)
election.sent_mail = False election.sent_mail = True
election.save() election.save()
# election.sent_mail = True

View file

@ -47,6 +47,15 @@
<span>{% trans "Mail en cours de distribution" %}</span> <span>{% trans "Mail en cours de distribution" %}</span>
</span> </span>
</div> </div>
{% else %}
<div class="level-item">
<span class="button is-light is-outlined is-success">
<span class="icon">
<i class="fas fa-check"></i>
</span>
<span>{% trans "Mail envoyé" %}</span>
</span>
</div>
{% endif %} {% endif %}
<div class="level-item"> <div class="level-item">