From 3438b32749cbabdf4f7e1fb2f4e6494573414019 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 20 Jun 2021 12:53:55 +0200 Subject: [PATCH] Finish task --- elections/tasks.py | 3 +-- elections/templates/elections/upload_voters.html | 9 +++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/elections/tasks.py b/elections/tasks.py index 74975fc..daac796 100644 --- a/elections/tasks.py +++ b/elections/tasks.py @@ -8,6 +8,5 @@ from .utils import send_mail def send_election_mail(election_pk, subject, body, reply_to): election = Election.objects.get(pk=election_pk) send_mail(election, subject, body, reply_to) - election.sent_mail = False + election.sent_mail = True election.save() - # election.sent_mail = True diff --git a/elections/templates/elections/upload_voters.html b/elections/templates/elections/upload_voters.html index fb8baab..a547d15 100644 --- a/elections/templates/elections/upload_voters.html +++ b/elections/templates/elections/upload_voters.html @@ -47,6 +47,15 @@ {% trans "Mail en cours de distribution" %} + {% else %} +
+ + + + + {% trans "Mail envoyé" %} + +
{% endif %}