diff --git a/elections/staticdefs.py b/elections/staticdefs.py index 4f9d27a..eae7612 100644 --- a/elections/staticdefs.py +++ b/elections/staticdefs.py @@ -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")), diff --git a/shared/utils.py b/shared/utils.py index cda8450..b8365ad 100644 --- a/shared/utils.py +++ b/shared/utils.py @@ -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)