chore(misc): More idiomatic

This commit is contained in:
Tom Hubrecht 2024-07-10 13:52:24 +02:00
parent fd65aa36ad
commit 1ca85957d2
2 changed files with 20 additions and 25 deletions

View file

@ -1,27 +1,24 @@
from django.utils.translation import gettext_lazy as _
MAIL_VOTERS = (
"Dear {full_name},\n"
"\n"
"\n"
"Election URL: {election_url}\n"
"The election will take place from {start} to {end}.\n"
"\n"
"Your voter ID: {username}\n"
"Your password: {password}\n"
"\n"
"-- \n"
"Kadenios"
)
MAIL_VOTERS = """Dear {full_name},
MAIL_VOTE_DELETED = (
"Dear {full_name},\n"
"\n"
"Your vote for {election_name} has been removed."
"\n"
"-- \n"
"Kadenios"
)
Election URL: {election_url}
The election will take place from {start} to {end}.
Your voter ID: {username}
Your password: {password}
--
Kadenios
"""
MAIL_VOTE_DELETED = """Dear {full_name},
Your vote for {election_name} has been removed.
--
Kadenios
"""
QUESTION_TYPES = [
("assentiment", _("Assentiment")),

View file

@ -5,7 +5,5 @@
def choices_length(choices):
"""Renvoie la longueur maximale des choix de choices"""
m = 0
for c in choices:
m = max(m, len(c[0]))
return m
return max(len(c[0]) for c in choices)