2021-01-27 14:55:28 +01:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
|
2020-12-24 00:41:29 +01:00
|
|
|
MAIL_VOTERS = (
|
|
|
|
"Dear {full_name},\n"
|
|
|
|
"\n"
|
|
|
|
"\n"
|
|
|
|
"Election URL: {election_url}\n"
|
2022-01-08 02:55:22 +01:00
|
|
|
"The election will take place from {start} to {end}.\n"
|
2020-12-24 00:41:29 +01:00
|
|
|
"\n"
|
|
|
|
"Your voter ID: {username}\n"
|
|
|
|
"Your password: {password}\n"
|
|
|
|
"\n"
|
|
|
|
"-- \n"
|
|
|
|
"Kadenios"
|
|
|
|
)
|
2021-01-27 14:55:28 +01:00
|
|
|
|
2021-03-31 13:16:10 +02:00
|
|
|
MAIL_VOTE_DELETED = (
|
|
|
|
"Dear {full_name},\n"
|
|
|
|
"\n"
|
|
|
|
"Your vote for {election_name} has been removed."
|
|
|
|
"\n"
|
|
|
|
"-- \n"
|
|
|
|
"Kadenios"
|
|
|
|
)
|
|
|
|
|
2021-03-19 11:48:38 +01:00
|
|
|
QUESTION_TYPES = [
|
|
|
|
("assentiment", _("Assentiment")),
|
2021-03-19 22:24:27 +01:00
|
|
|
("uninominal", _("Uninominal")),
|
2021-03-29 12:42:34 +02:00
|
|
|
("condorcet", _("Condorcet")),
|
2021-03-19 11:48:38 +01:00
|
|
|
]
|
2021-03-19 12:04:21 +01:00
|
|
|
|
2021-03-29 12:42:34 +02:00
|
|
|
BALLOT_TYPE = {
|
2021-03-29 20:35:34 +02:00
|
|
|
"assentiment": "select",
|
|
|
|
"uninominal": "select",
|
|
|
|
"condorcet": "rank",
|
2021-03-29 12:42:34 +02:00
|
|
|
}
|
|
|
|
|
2021-03-19 12:04:21 +01:00
|
|
|
VOTE_RULES = {
|
|
|
|
"assentiment": _(
|
|
|
|
"Le mode de scrutin pour cette question est un vote par assentiment. "
|
|
|
|
"Vous pouvez donc sélectionner autant d'options que vous souhaitez. "
|
|
|
|
"Vous pouvez également ne sélectionner aucune option."
|
2021-03-19 22:24:27 +01:00
|
|
|
),
|
|
|
|
"uninominal": _(
|
|
|
|
"Le mode de scrutin pour cette question est un vote uninominal. "
|
|
|
|
"Vous ne pouvez donc sélectionner qu'une seule option."
|
|
|
|
),
|
2021-03-29 12:42:34 +02:00
|
|
|
"condorcet": _(
|
|
|
|
"Le mode de scrutin pour cette question est un vote de type condorcet. "
|
2021-04-12 21:07:39 +02:00
|
|
|
"Vous devez classer les options <b>entre 1 et {nb_options}</b>, l'option "
|
2021-04-07 13:49:29 +02:00
|
|
|
"classée 1 étant votre préférée. <b>Vous pouvez donner le même classement "
|
|
|
|
"à plusieurs options</b>, si vous laissez vide le classement d'une option, "
|
2021-03-29 12:42:34 +02:00
|
|
|
"elle sera classée dernière automatiquement."
|
|
|
|
),
|
2021-03-19 12:04:21 +01:00
|
|
|
}
|
2021-03-19 14:25:13 +01:00
|
|
|
|
|
|
|
CAST_FUNCTIONS = {
|
|
|
|
"assentiment": "cast_select",
|
2021-03-19 22:24:27 +01:00
|
|
|
"uninominal": "cast_select",
|
2021-03-29 12:42:34 +02:00
|
|
|
"condorcet": "cast_rank",
|
2021-03-19 14:25:13 +01:00
|
|
|
}
|
2021-03-19 16:08:02 +01:00
|
|
|
|
|
|
|
TALLY_FUNCTIONS = {
|
|
|
|
"assentiment": "tally_select",
|
2021-03-19 22:24:27 +01:00
|
|
|
"uninominal": "tally_select",
|
2021-04-04 23:54:48 +02:00
|
|
|
"condorcet": "tally_schultze",
|
2021-03-19 22:24:27 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
VALIDATE_FUNCTIONS = {
|
|
|
|
"assentiment": "always_true",
|
|
|
|
"uninominal": "unique_selected",
|
2021-03-29 12:42:34 +02:00
|
|
|
"condorcet": "limit_ranks",
|
2021-03-19 16:08:02 +01:00
|
|
|
}
|