On récupère mieux l'adresse de l'élection
This commit is contained in:
parent
77c9880cf4
commit
f83ba70acf
1 changed files with 3 additions and 1 deletions
|
@ -11,6 +11,7 @@ from django.core.exceptions import ValidationError
|
|||
from django.core.mail import EmailMessage, get_connection
|
||||
from django.core.validators import validate_email
|
||||
from django.template.loader import render_to_string
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
# #############################################################################
|
||||
|
@ -348,7 +349,8 @@ def send_mail(election, mail_form):
|
|||
from .models import User
|
||||
|
||||
voters = list(election.registered_voters.all())
|
||||
url = f"https://kadenios.eleves.ens.fr/elections/view/{election.id}"
|
||||
e_url = reverse("election.view", args=[election.id])
|
||||
url = f"https://vote.eleves.ens.fr/{e_url}"
|
||||
messages = []
|
||||
for v in voters:
|
||||
password = generate_password()
|
||||
|
|
Loading…
Reference in a new issue