1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-11-30 10:53:01 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Emmy D'Anello
d84db949c6
Fix trigram validation
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2024-06-13 11:03:10 +02:00
Emmy D'Anello
2627b3a9b8
Add migrations for ETEAM
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
2024-06-13 10:57:51 +02:00
5 changed files with 306 additions and 163 deletions

View File

@ -0,0 +1,69 @@
# Generated by Django 5.0.6 on 2024-06-13 08:53
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("draw", "0004_alter_round_number"),
]
operations = [
migrations.AlterField(
model_name="round",
name="number",
field=models.PositiveSmallIntegerField(
choices=[(1, "Round 1"), (2, "Round 2"), (3, "Round 3")],
help_text="The number of the round, 1 or 2 (or 3 for ETEAM)",
validators=[
django.core.validators.MinValueValidator(1),
django.core.validators.MaxValueValidator(3),
],
verbose_name="number",
),
),
migrations.AlterField(
model_name="teamdraw",
name="accepted",
field=models.PositiveSmallIntegerField(
choices=[
(1, "Problem #1"),
(2, "Problem #2"),
(3, "Problem #3"),
(4, "Problem #4"),
(5, "Problem #5"),
(6, "Problem #6"),
(7, "Problem #7"),
(8, "Problem #8"),
(9, "Problem #9"),
(10, "Problem #10"),
],
default=None,
null=True,
verbose_name="accepted problem",
),
),
migrations.AlterField(
model_name="teamdraw",
name="purposed",
field=models.PositiveSmallIntegerField(
choices=[
(1, "Problem #1"),
(2, "Problem #2"),
(3, "Problem #3"),
(4, "Problem #4"),
(5, "Problem #5"),
(6, "Problem #6"),
(7, "Problem #7"),
(8, "Problem #8"),
(9, "Problem #9"),
(10, "Problem #10"),
],
default=None,
null=True,
verbose_name="purposed problem",
),
),
]

View File

@ -193,7 +193,7 @@ class Round(models.Model):
choices=[ choices=[
(1, _('Round 1')), (1, _('Round 1')),
(2, _('Round 2')), (2, _('Round 2')),
] + ([] if settings.NB_ROUNDS == 2 else [(3, _('Round 3'))]), (3, _('Round 3'))],
verbose_name=_('number'), verbose_name=_('number'),
help_text=_("The number of the round, 1 or 2 (or 3 for ETEAM)"), help_text=_("The number of the round, 1 or 2 (or 3 for ETEAM)"),
validators=[MinValueValidator(1), MaxValueValidator(settings.NB_ROUNDS)], validators=[MinValueValidator(1), MaxValueValidator(settings.NB_ROUNDS)],

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: TFJM\n" "Project-Id-Version: TFJM\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-08 00:37+0200\n" "POT-Creation-Date: 2024-06-13 10:56+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n" "Last-Translator: Emmy D'Anello <emmy.danello@animath.fr>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -37,7 +37,7 @@ msgstr "Canaux d'équipes"
msgid "Private channels" msgid "Private channels"
msgstr "Messages privés" msgstr "Messages privés"
#: chat/models.py:29 participation/models.py:36 participation/models.py:266 #: chat/models.py:29 participation/models.py:36 participation/models.py:272
#: participation/tables.py:18 participation/tables.py:34 #: participation/tables.py:18 participation/tables.py:34
msgid "name" msgid "name"
msgstr "nom" msgstr "nom"
@ -78,8 +78,8 @@ msgstr "Type de permission nécessaire pour écrire un message dans un canal."
#: chat/models.py:62 draw/admin.py:53 draw/admin.py:71 draw/admin.py:88 #: chat/models.py:62 draw/admin.py:53 draw/admin.py:71 draw/admin.py:88
#: draw/models.py:26 participation/admin.py:79 participation/admin.py:140 #: draw/models.py:26 participation/admin.py:79 participation/admin.py:140
#: participation/admin.py:171 participation/models.py:721 #: participation/admin.py:171 participation/models.py:727
#: participation/models.py:745 participation/models.py:1006 #: participation/models.py:751 participation/models.py:1012
#: registration/models.py:763 #: registration/models.py:763
#: registration/templates/registration/payment_form.html:53 #: registration/templates/registration/payment_form.html:53
msgid "tournament" msgid "tournament"
@ -95,7 +95,7 @@ msgstr ""
#: chat/models.py:73 draw/models.py:429 draw/models.py:456 #: chat/models.py:73 draw/models.py:429 draw/models.py:456
#: participation/admin.py:136 participation/admin.py:155 #: participation/admin.py:136 participation/admin.py:155
#: participation/models.py:1509 participation/models.py:1518 #: participation/models.py:1515 participation/models.py:1524
#: participation/tables.py:84 #: participation/tables.py:84
msgid "pool" msgid "pool"
msgstr "poule" msgstr "poule"
@ -108,8 +108,8 @@ msgstr ""
"concernée." "concernée."
#: chat/models.py:84 draw/templates/draw/tournament_content.html:277 #: chat/models.py:84 draw/templates/draw/tournament_content.html:277
#: participation/admin.py:167 participation/models.py:255 #: participation/admin.py:167 participation/models.py:261
#: participation/models.py:736 #: participation/models.py:742
#: participation/templates/participation/tournament_harmonize.html:15 #: participation/templates/participation/tournament_harmonize.html:15
#: registration/models.py:158 registration/models.py:754 #: registration/models.py:158 registration/models.py:754
#: registration/tables.py:39 #: registration/tables.py:39
@ -259,13 +259,13 @@ msgid "Log in"
msgstr "Connexion" msgstr "Connexion"
#: draw/admin.py:39 draw/admin.py:57 draw/admin.py:75 #: draw/admin.py:39 draw/admin.py:57 draw/admin.py:75
#: participation/admin.py:109 participation/models.py:256 #: participation/admin.py:109 participation/models.py:262
#: participation/tables.py:88 #: participation/tables.py:88
msgid "teams" msgid "teams"
msgstr "équipes" msgstr "équipes"
#: draw/admin.py:92 draw/models.py:234 draw/models.py:448 #: draw/admin.py:92 draw/models.py:234 draw/models.py:448
#: participation/models.py:1010 #: participation/models.py:1016
msgid "round" msgid "round"
msgstr "tour" msgstr "tour"
@ -407,7 +407,7 @@ msgstr "La poule en cours, où les équipes choisissent leurs problèmes"
msgid "rounds" msgid "rounds"
msgstr "tours" msgstr "tours"
#: draw/models.py:257 participation/models.py:1018 #: draw/models.py:257 participation/models.py:1024
msgid "letter" msgid "letter"
msgstr "lettre" msgstr "lettre"
@ -445,12 +445,12 @@ msgstr "L'instance complète de la poule."
msgid "Pool {letter}{number}" msgid "Pool {letter}{number}"
msgstr "Poule {letter}{number}" msgstr "Poule {letter}{number}"
#: draw/models.py:430 participation/models.py:1510 #: draw/models.py:430 participation/models.py:1516
msgid "pools" msgid "pools"
msgstr "poules" msgstr "poules"
#: draw/models.py:442 participation/models.py:996 participation/models.py:1659 #: draw/models.py:442 participation/models.py:1002 participation/models.py:1665
#: participation/models.py:1689 participation/models.py:1731 #: participation/models.py:1695 participation/models.py:1737
msgid "participation" msgid "participation"
msgstr "participation" msgstr "participation"
@ -474,8 +474,8 @@ msgid ""
msgstr "" msgstr ""
"L'ordre de choix dans la poule, entre 0 et la taille de la poule moins 1." "L'ordre de choix dans la poule, entre 0 et la taille de la poule moins 1."
#: draw/models.py:479 draw/models.py:502 participation/models.py:1532 #: draw/models.py:479 draw/models.py:502 participation/models.py:1538
#: participation/models.py:1696 #: participation/models.py:1702
#, python-brace-format #, python-brace-format
msgid "Problem #{problem}" msgid "Problem #{problem}"
msgstr "Problème n°{problem}" msgstr "Problème n°{problem}"
@ -686,26 +686,26 @@ msgstr "Changelog de type \"{action}\" pour le modèle {model} le {timestamp}"
msgid "valid" msgid "valid"
msgstr "valide" msgstr "valide"
#: participation/admin.py:87 participation/models.py:757 #: participation/admin.py:87 participation/models.py:763
msgid "selected for final" msgid "selected for final"
msgstr "sélectionnée pour la finale" msgstr "sélectionnée pour la finale"
#: participation/admin.py:124 participation/admin.py:183 #: participation/admin.py:124 participation/admin.py:183
#: participation/models.py:1539 participation/tables.py:112 #: participation/models.py:1545 participation/tables.py:112
msgid "defender" msgid "defender"
msgstr "défenseur⋅se" msgstr "défenseur⋅se"
#: participation/admin.py:128 participation/models.py:1546 #: participation/admin.py:128 participation/models.py:1552
#: participation/models.py:1743 #: participation/models.py:1749
msgid "opponent" msgid "opponent"
msgstr "opposant⋅e" msgstr "opposant⋅e"
#: participation/admin.py:132 participation/models.py:1553 #: participation/admin.py:132 participation/models.py:1559
#: participation/models.py:1744 #: participation/models.py:1750
msgid "reporter" msgid "reporter"
msgstr "rapporteur⋅rice" msgstr "rapporteur⋅rice"
#: participation/admin.py:187 participation/models.py:1694 #: participation/admin.py:187 participation/models.py:1700
msgid "problem" msgid "problem"
msgstr "numéro de problème" msgstr "numéro de problème"
@ -952,134 +952,139 @@ msgstr ""
msgid "Pending validation" msgid "Pending validation"
msgstr "Validation en attente" msgstr "Validation en attente"
#: participation/models.py:252 #: participation/models.py:241
#, python-brace-format
msgid "The team code must be composed of {nb_letters} uppercase letters."
msgstr "Le code d'équipe doit être composé de {nb_letters} lettres majuscules."
#: participation/models.py:258
#, python-brace-format #, python-brace-format
msgid "Team {name} ({trigram})" msgid "Team {name} ({trigram})"
msgstr "Équipe {name} ({trigram})" msgstr "Équipe {name} ({trigram})"
#: participation/models.py:271 #: participation/models.py:277
msgid "start" msgid "start"
msgstr "début" msgstr "début"
#: participation/models.py:276 #: participation/models.py:282
msgid "end" msgid "end"
msgstr "fin" msgstr "fin"
#: participation/models.py:282 #: participation/models.py:288
#: participation/templates/participation/tournament_detail.html:18 #: participation/templates/participation/tournament_detail.html:18
msgid "place" msgid "place"
msgstr "lieu" msgstr "lieu"
#: participation/models.py:286 #: participation/models.py:292
msgid "max team count" msgid "max team count"
msgstr "nombre maximal d'équipes" msgstr "nombre maximal d'équipes"
#: participation/models.py:291 #: participation/models.py:297
#: participation/templates/participation/tournament_detail.html:22 #: participation/templates/participation/tournament_detail.html:22
msgid "price" msgid "price"
msgstr "prix" msgstr "prix"
#: participation/models.py:296 #: participation/models.py:302
#: participation/templates/participation/tournament_detail.html:26 #: participation/templates/participation/tournament_detail.html:26
msgid "remote" msgid "remote"
msgstr "à distance" msgstr "à distance"
#: participation/models.py:301 #: participation/models.py:307
msgid "limit date for registrations" msgid "limit date for registrations"
msgstr "date limite d'inscription" msgstr "date limite d'inscription"
#: participation/models.py:306 #: participation/models.py:312
msgid "limit date to upload solutions" msgid "limit date to upload solutions"
msgstr "date limite pour envoyer les solutions" msgstr "date limite pour envoyer les solutions"
#: participation/models.py:311 #: participation/models.py:317
msgid "random draw for solutions" msgid "random draw for solutions"
msgstr "tirage au sort des solutions" msgstr "tirage au sort des solutions"
#: participation/models.py:316 #: participation/models.py:322
msgid "first phase date" msgid "first phase date"
msgstr "date du premier tour" msgstr "date du premier tour"
#: participation/models.py:321 #: participation/models.py:327
msgid "limit date to upload the syntheses for the first phase" msgid "limit date to upload the syntheses for the first phase"
msgstr "date limite pour envoyer les notes de synthèses pour la première phase" msgstr "date limite pour envoyer les notes de synthèses pour la première phase"
#: participation/models.py:326 #: participation/models.py:332
msgid "first second date" msgid "first second date"
msgstr "date du second tour" msgstr "date du second tour"
#: participation/models.py:331 #: participation/models.py:337
msgid "check this case when solutions for the second round become available" msgid "check this case when solutions for the second round become available"
msgstr "" msgstr ""
"cocher la case lorsque les solutions pour le second tour sont accessibles" "cocher la case lorsque les solutions pour le second tour sont accessibles"
#: participation/models.py:336 #: participation/models.py:342
msgid "limit date to upload the syntheses for the second phase" msgid "limit date to upload the syntheses for the second phase"
msgstr "date limite d'envoi des notes de synthèse pour la seconde phase" msgstr "date limite d'envoi des notes de synthèse pour la seconde phase"
#: participation/models.py:341 #: participation/models.py:347
msgid "third phase date" msgid "third phase date"
msgstr "date du troisième tour" msgstr "date du troisième tour"
#: participation/models.py:346 #: participation/models.py:352
msgid "check this case when solutions for the third round become available" msgid "check this case when solutions for the third round become available"
msgstr "" msgstr ""
"cocher la case lorsque les solutions pour le second tour sont accessibles" "cocher la case lorsque les solutions pour le second tour sont accessibles"
#: participation/models.py:351 #: participation/models.py:357
msgid "limit date to upload the syntheses for the third phase" msgid "limit date to upload the syntheses for the third phase"
msgstr "" msgstr ""
"date limite pour envoyer les notes de synthèses pour la troisième phase" "date limite pour envoyer les notes de synthèses pour la troisième phase"
#: participation/models.py:356 #: participation/models.py:362
#: participation/templates/participation/tournament_detail.html:52 #: participation/templates/participation/tournament_detail.html:52
msgid "description" msgid "description"
msgstr "description" msgstr "description"
#: participation/models.py:362 #: participation/models.py:368
#: participation/templates/participation/tournament_detail.html:12 #: participation/templates/participation/tournament_detail.html:12
msgid "organizers" msgid "organizers"
msgstr "organisateur⋅rices" msgstr "organisateur⋅rices"
#: participation/models.py:367 #: participation/models.py:373
#: participation/templates/participation/team_detail.html:167 #: participation/templates/participation/team_detail.html:167
msgid "final" msgid "final"
msgstr "finale" msgstr "finale"
#: participation/models.py:375 #: participation/models.py:381
msgid "Google Sheet ID" msgid "Google Sheet ID"
msgstr "ID de la feuille Google Sheets" msgstr "ID de la feuille Google Sheets"
#: participation/models.py:722 registration/admin.py:125 #: participation/models.py:728 registration/admin.py:125
msgid "tournaments" msgid "tournaments"
msgstr "tournois" msgstr "tournois"
#: participation/models.py:751 #: participation/models.py:757
msgid "valid team" msgid "valid team"
msgstr "équipe valide" msgstr "équipe valide"
#: participation/models.py:752 #: participation/models.py:758
msgid "The participation got the validation of the organizers." msgid "The participation got the validation of the organizers."
msgstr "La participation a été validée par les organisateur⋅rices." msgstr "La participation a été validée par les organisateur⋅rices."
#: participation/models.py:758 #: participation/models.py:764
msgid "The team is selected for the final tournament." msgid "The team is selected for the final tournament."
msgstr "L'équipe est sélectionnée pour la finale." msgstr "L'équipe est sélectionnée pour la finale."
#: participation/models.py:762 #: participation/models.py:768
msgid "mention" msgid "mention"
msgstr "mention" msgstr "mention"
#: participation/models.py:769 #: participation/models.py:775
msgid "mention (final)" msgid "mention (final)"
msgstr "Mention (pour la finale) :" msgstr "Mention (pour la finale) :"
#: participation/models.py:779 #: participation/models.py:785
#, python-brace-format #, python-brace-format
msgid "Participation of the team {name} ({trigram})" msgid "Participation of the team {name} ({trigram})"
msgstr "Participation de l'équipe {name} ({trigram})" msgstr "Participation de l'équipe {name} ({trigram})"
#: participation/models.py:786 #: participation/models.py:792
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"<p>The team {trigram} has {nb_missing_payments} missing payments. Each " "<p>The team {trigram} has {nb_missing_payments} missing payments. Each "
@ -1092,11 +1097,11 @@ msgstr ""
"notification de bourse) pour participer au tournoi.</p><p>Les participant⋅es " "notification de bourse) pour participer au tournoi.</p><p>Les participant⋅es "
"qui n'ont pas encore payé sont : {participants}.</p>" "qui n'ont pas encore payé sont : {participants}.</p>"
#: participation/models.py:794 #: participation/models.py:800
msgid "Missing payments" msgid "Missing payments"
msgstr "Paiements manquants" msgstr "Paiements manquants"
#: participation/models.py:811 #: participation/models.py:817
msgid "" msgid ""
"<p>The solutions for the tournament of {tournament} are due on the {date:%Y-" "<p>The solutions for the tournament of {tournament} are due on the {date:%Y-"
"%m-%d %H:%M}.</p><p>You have currently sent <strong>{nb_solutions}</strong> " "%m-%d %H:%M}.</p><p>You have currently sent <strong>{nb_solutions}</strong> "
@ -1111,11 +1116,11 @@ msgstr ""
"pouvez envoyer vos solutions sur <a href='{url}'>votre page de " "pouvez envoyer vos solutions sur <a href='{url}'>votre page de "
"participation</a>.</p>" "participation</a>.</p>"
#: participation/models.py:821 participation/models.py:835 #: participation/models.py:827 participation/models.py:841
msgid "Solutions due" msgid "Solutions due"
msgstr "Rendu des solutions" msgstr "Rendu des solutions"
#: participation/models.py:827 #: participation/models.py:833
msgid "" msgid ""
"<p>The solutions for the tournament of {tournament} are due on the {date:%Y-" "<p>The solutions for the tournament of {tournament} are due on the {date:%Y-"
"%m-%d %H:%M}.</p><p>Remember that you can only fix minor changes to your " "%m-%d %H:%M}.</p><p>Remember that you can only fix minor changes to your "
@ -1128,7 +1133,7 @@ msgstr ""
"parties.</p><p>Vous pouvez envoyer vos solutions sur <a href='{url}'>votre " "parties.</p><p>Vous pouvez envoyer vos solutions sur <a href='{url}'>votre "
"page de participation</a>.</p>" "page de participation</a>.</p>"
#: participation/models.py:841 registration/models.py:607 #: participation/models.py:847 registration/models.py:607
msgid "" msgid ""
"<p>The draw of the solutions for the tournament {tournament} is planned on " "<p>The draw of the solutions for the tournament {tournament} is planned on "
"the {date:%Y-%m-%d %H:%M}. You can join it on <a href='{url}'>this link</a>." "the {date:%Y-%m-%d %H:%M}. You can join it on <a href='{url}'>this link</a>."
@ -1138,11 +1143,11 @@ msgstr ""
"{date:%d/%m/%Y %H:%M}. Vous pouvez y participer sur <a href='{url}'>ce lien</" "{date:%d/%m/%Y %H:%M}. Vous pouvez y participer sur <a href='{url}'>ce lien</"
"a>.</p>" "a>.</p>"
#: participation/models.py:847 registration/models.py:614 #: participation/models.py:853 registration/models.py:614
msgid "Draw of solutions" msgid "Draw of solutions"
msgstr "Tirage au sort des solutions" msgstr "Tirage au sort des solutions"
#: participation/models.py:857 #: participation/models.py:863
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"<p>The solutions draw is ended. You can check the result on <a " "<p>The solutions draw is ended. You can check the result on <a "
@ -1154,8 +1159,8 @@ msgstr ""
"tour, vous défendrez <a href='{solution_url}'>votre solution du problème " "tour, vous défendrez <a href='{solution_url}'>votre solution du problème "
"{problem}</a>.</p>" "{problem}</a>.</p>"
#: participation/models.py:866 participation/models.py:908 #: participation/models.py:872 participation/models.py:914
#: participation/models.py:951 #: participation/models.py:957
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"<p>You will oppose the solution of the team {opponent} on the <a " "<p>You will oppose the solution of the team {opponent} on the <a "
@ -1166,8 +1171,8 @@ msgstr ""
"href='{solution_url}'>problème {problem}</a>. Vous pouvez envoyer votre note " "href='{solution_url}'>problème {problem}</a>. Vous pouvez envoyer votre note "
"de synthèse sur <a href='{passage_url}'>cette page</a>.</p>" "de synthèse sur <a href='{passage_url}'>cette page</a>.</p>"
#: participation/models.py:875 participation/models.py:917 #: participation/models.py:881 participation/models.py:923
#: participation/models.py:960 #: participation/models.py:966
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"<p>You will report the solution of the team {reporter} on the <a " "<p>You will report the solution of the team {reporter} on the <a "
@ -1178,11 +1183,11 @@ msgstr ""
"href='{solution_url}'>problème {problem}</a>. Vous pouvez envoyer votre note " "href='{solution_url}'>problème {problem}</a>. Vous pouvez envoyer votre note "
"de synthèse sur <a href='{passage_url}'>cette page</a>.</p>" "de synthèse sur <a href='{passage_url}'>cette page</a>.</p>"
#: participation/models.py:891 registration/models.py:629 #: participation/models.py:897 registration/models.py:629
msgid "First round" msgid "First round"
msgstr "Premier tour" msgstr "Premier tour"
#: participation/models.py:901 #: participation/models.py:907
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"<p>For the second round, you will defend <a href='{solution_url}'>your " "<p>For the second round, you will defend <a href='{solution_url}'>your "
@ -1191,12 +1196,12 @@ msgstr ""
"<p>Pour le second tour, vous défendrez <a href='{solution_url}'>votre " "<p>Pour le second tour, vous défendrez <a href='{solution_url}'>votre "
"solution du problème {problem}</a>.</p>" "solution du problème {problem}</a>.</p>"
#: participation/models.py:933 participation/models.py:976 #: participation/models.py:939 participation/models.py:982
#: registration/models.py:640 #: registration/models.py:640
msgid "Second round" msgid "Second round"
msgstr "Second tour" msgstr "Second tour"
#: participation/models.py:944 #: participation/models.py:950
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"<p>For the third round, you will defend <a href='{solution_url}'>your " "<p>For the third round, you will defend <a href='{solution_url}'>your "
@ -1205,7 +1210,7 @@ msgstr ""
"<p>Pour le troisième tour, vous défendrez <a href='{solution_url}'>votre " "<p>Pour le troisième tour, vous défendrez <a href='{solution_url}'>votre "
"solution du problème {problem}</a>.</p>" "solution du problème {problem}</a>.</p>"
#: participation/models.py:982 #: participation/models.py:988
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"<p>The tournament {tournament} is ended. You can check the results on the <a " "<p>The tournament {tournament} is ended. You can check the results on the <a "
@ -1214,57 +1219,57 @@ msgstr ""
"<p>Le tournoi {tournament} est terminé. Vous pouvez consulter les résultats " "<p>Le tournoi {tournament} est terminé. Vous pouvez consulter les résultats "
"sur la <a href='{url}'>page du tournoi</a>.</p>" "sur la <a href='{url}'>page du tournoi</a>.</p>"
#: participation/models.py:987 #: participation/models.py:993
msgid "Tournament ended" msgid "Tournament ended"
msgstr "Tournoi terminé" msgstr "Tournoi terminé"
#: participation/models.py:997 participation/models.py:1040 #: participation/models.py:1003 participation/models.py:1046
msgid "participations" msgid "participations"
msgstr "participations" msgstr "participations"
#: participation/models.py:1012 participation/models.py:1013 #: participation/models.py:1018 participation/models.py:1019
#: participation/models.py:1014 #: participation/models.py:1020
#, python-brace-format #, python-brace-format
msgid "Round {round}" msgid "Round {round}"
msgstr "Tour {round}" msgstr "Tour {round}"
#: participation/models.py:1028 #: participation/models.py:1034
msgid "room" msgid "room"
msgstr "salle" msgstr "salle"
#: participation/models.py:1030 #: participation/models.py:1036
msgid "Room 1" msgid "Room 1"
msgstr "Salle 1" msgstr "Salle 1"
#: participation/models.py:1031 #: participation/models.py:1037
msgid "Room 2" msgid "Room 2"
msgstr "Salle 2" msgstr "Salle 2"
#: participation/models.py:1034 #: participation/models.py:1040
msgid "For 5-teams pools only" msgid "For 5-teams pools only"
msgstr "Pour les poules de 5 équipe uniquement" msgstr "Pour les poules de 5 équipe uniquement"
#: participation/models.py:1046 #: participation/models.py:1052
msgid "juries" msgid "juries"
msgstr "jurys" msgstr "jurys"
#: participation/models.py:1055 #: participation/models.py:1061
msgid "president of the jury" msgid "president of the jury"
msgstr "président⋅e du jury" msgstr "président⋅e du jury"
#: participation/models.py:1062 #: participation/models.py:1068
msgid "BigBlueButton URL" msgid "BigBlueButton URL"
msgstr "Lien BigBlueButton" msgstr "Lien BigBlueButton"
#: participation/models.py:1063 #: participation/models.py:1069
msgid "The link of the BBB visio for this pool." msgid "The link of the BBB visio for this pool."
msgstr "Le lien du salon BBB pour cette poule." msgstr "Le lien du salon BBB pour cette poule."
#: participation/models.py:1068 #: participation/models.py:1074
msgid "results available" msgid "results available"
msgstr "résultats disponibles" msgstr "résultats disponibles"
#: participation/models.py:1069 #: participation/models.py:1075
msgid "" msgid ""
"Check this case when results become accessible to teams. They stay " "Check this case when results become accessible to teams. They stay "
"accessible to you. Only averages are given." "accessible to you. Only averages are given."
@ -1273,33 +1278,33 @@ msgstr ""
"Ils restent toujours accessibles pour vous. Seules les moyennes sont " "Ils restent toujours accessibles pour vous. Seules les moyennes sont "
"communiquées." "communiquées."
#: participation/models.py:1101 #: participation/models.py:1107
msgid "The president of the jury must be part of the jury." msgid "The president of the jury must be part of the jury."
msgstr "Læ président⋅e du jury doit faire partie du jury." msgstr "Læ président⋅e du jury doit faire partie du jury."
#: participation/models.py:1490 #: participation/models.py:1496
#, python-brace-format #, python-brace-format
msgid "The jury {jury} is not part of the jury for this pool." msgid "The jury {jury} is not part of the jury for this pool."
msgstr "{jury} ne fait pas partie du jury pour cette poule." msgstr "{jury} ne fait pas partie du jury pour cette poule."
#: participation/models.py:1503 #: participation/models.py:1509
#, python-brace-format #, python-brace-format
msgid "Pool {code} for tournament {tournament} with teams {teams}" msgid "Pool {code} for tournament {tournament} with teams {teams}"
msgstr "Poule {code} du tournoi {tournament} avec les équipes {teams}" msgstr "Poule {code} du tournoi {tournament} avec les équipes {teams}"
#: participation/models.py:1523 #: participation/models.py:1529
msgid "position" msgid "position"
msgstr "position" msgstr "position"
#: participation/models.py:1530 #: participation/models.py:1536
msgid "defended solution" msgid "defended solution"
msgstr "solution défendue" msgstr "solution défendue"
#: participation/models.py:1558 #: participation/models.py:1564
msgid "penalties" msgid "penalties"
msgstr "pénalités" msgstr "pénalités"
#: participation/models.py:1560 #: participation/models.py:1566
msgid "" msgid ""
"Number of penalties for the defender. The defender will loose a 0.5 " "Number of penalties for the defender. The defender will loose a 0.5 "
"coefficient per penalty." "coefficient per penalty."
@ -1307,120 +1312,120 @@ msgstr ""
"Nombre de pénalités pour l'équipe défenseuse. Elle perd un coefficient 0.5 " "Nombre de pénalités pour l'équipe défenseuse. Elle perd un coefficient 0.5 "
"sur sa présentation orale par pénalité." "sur sa présentation orale par pénalité."
#: participation/models.py:1629 participation/models.py:1632 #: participation/models.py:1635 participation/models.py:1638
#: participation/models.py:1635 #: participation/models.py:1641
#, python-brace-format #, python-brace-format
msgid "Team {trigram} is not registered in the pool." msgid "Team {trigram} is not registered in the pool."
msgstr "L'équipe {trigram} n'est pas inscrite dans la poule." msgstr "L'équipe {trigram} n'est pas inscrite dans la poule."
#: participation/models.py:1640 #: participation/models.py:1646
#, python-brace-format #, python-brace-format
msgid "Passage of {defender} for problem {problem}" msgid "Passage of {defender} for problem {problem}"
msgstr "Passage de {defender} pour le problème {problem}" msgstr "Passage de {defender} pour le problème {problem}"
#: participation/models.py:1644 participation/models.py:1653 #: participation/models.py:1650 participation/models.py:1659
#: participation/models.py:1738 participation/models.py:1780 #: participation/models.py:1744 participation/models.py:1786
msgid "passage" msgid "passage"
msgstr "passage" msgstr "passage"
#: participation/models.py:1645 #: participation/models.py:1651
msgid "passages" msgid "passages"
msgstr "passages" msgstr "passages"
#: participation/models.py:1664 #: participation/models.py:1670
msgid "difference" msgid "difference"
msgstr "différence" msgstr "différence"
#: participation/models.py:1665 #: participation/models.py:1671
msgid "Score to add/remove on the final score" msgid "Score to add/remove on the final score"
msgstr "Score à ajouter/retrancher au score final" msgstr "Score à ajouter/retrancher au score final"
#: participation/models.py:1672 #: participation/models.py:1678
msgid "tweak" msgid "tweak"
msgstr "harmonisation" msgstr "harmonisation"
#: participation/models.py:1673 #: participation/models.py:1679
msgid "tweaks" msgid "tweaks"
msgstr "harmonisations" msgstr "harmonisations"
#: participation/models.py:1701 #: participation/models.py:1707
msgid "solution for the final tournament" msgid "solution for the final tournament"
msgstr "solution pour la finale" msgstr "solution pour la finale"
#: participation/models.py:1706 participation/models.py:1749 #: participation/models.py:1712 participation/models.py:1755
msgid "file" msgid "file"
msgstr "fichier" msgstr "fichier"
#: participation/models.py:1716 #: participation/models.py:1722
#, python-brace-format #, python-brace-format
msgid "Solution of team {team} for problem {problem}" msgid "Solution of team {team} for problem {problem}"
msgstr "Solution de l'équipe {team} pour le problème {problem}" msgstr "Solution de l'équipe {team} pour le problème {problem}"
#: participation/models.py:1718 #: participation/models.py:1724
msgid "for final" msgid "for final"
msgstr "pour la finale" msgstr "pour la finale"
#: participation/models.py:1721 #: participation/models.py:1727
msgid "solution" msgid "solution"
msgstr "solution" msgstr "solution"
#: participation/models.py:1722 #: participation/models.py:1728
msgid "solutions" msgid "solutions"
msgstr "solutions" msgstr "solutions"
#: participation/models.py:1755 #: participation/models.py:1761
#, python-brace-format #, python-brace-format
msgid "Synthesis of {team} as {type} for problem {problem} of {defender}" msgid "Synthesis of {team} as {type} for problem {problem} of {defender}"
msgstr "" msgstr ""
"Note de synthèse de l'équipe {team} en tant que {type} pour le problème " "Note de synthèse de l'équipe {team} en tant que {type} pour le problème "
"{problem} de {defender}" "{problem} de {defender}"
#: participation/models.py:1763 #: participation/models.py:1769
msgid "synthesis" msgid "synthesis"
msgstr "note de synthèse" msgstr "note de synthèse"
#: participation/models.py:1764 #: participation/models.py:1770
msgid "syntheses" msgid "syntheses"
msgstr "notes de synthèse" msgstr "notes de synthèse"
#: participation/models.py:1773 #: participation/models.py:1779
msgid "jury" msgid "jury"
msgstr "jury" msgstr "jury"
#: participation/models.py:1785 #: participation/models.py:1791
msgid "defender writing note" msgid "defender writing note"
msgstr "note d'écrit défenseur⋅se" msgstr "note d'écrit défenseur⋅se"
#: participation/models.py:1791 #: participation/models.py:1797
msgid "defender oral note" msgid "defender oral note"
msgstr "note d'oral défenseur⋅se" msgstr "note d'oral défenseur⋅se"
#: participation/models.py:1797 #: participation/models.py:1803
msgid "opponent writing note" msgid "opponent writing note"
msgstr "note d'écrit opposant⋅e" msgstr "note d'écrit opposant⋅e"
#: participation/models.py:1803 #: participation/models.py:1809
msgid "opponent oral note" msgid "opponent oral note"
msgstr "note d'oral opposant⋅e" msgstr "note d'oral opposant⋅e"
#: participation/models.py:1809 #: participation/models.py:1815
msgid "reporter writing note" msgid "reporter writing note"
msgstr "note d'écrit rapporteur⋅rice" msgstr "note d'écrit rapporteur⋅rice"
#: participation/models.py:1815 #: participation/models.py:1821
msgid "reporter oral note" msgid "reporter oral note"
msgstr "note d'oral du rapporteur⋅rice" msgstr "note d'oral du rapporteur⋅rice"
#: participation/models.py:1875 #: participation/models.py:1881
#, python-brace-format #, python-brace-format
msgid "Notes of {jury} for {passage}" msgid "Notes of {jury} for {passage}"
msgstr "Notes de {jury} pour le {passage}" msgstr "Notes de {jury} pour le {passage}"
#: participation/models.py:1878 #: participation/models.py:1884
msgid "note" msgid "note"
msgstr "note" msgstr "note"
#: participation/models.py:1879 #: participation/models.py:1885
msgid "notes" msgid "notes"
msgstr "notes" msgstr "notes"
@ -2981,8 +2986,8 @@ msgid ""
"You recently registered on the ETEAM platform. Please click on the link " "You recently registered on the ETEAM platform. Please click on the link "
"below to confirm your registration." "below to confirm your registration."
msgstr "" msgstr ""
"Vous vous êtes inscrit⋅e sur la plateforme de l'ETEAM. Merci de cliquer sur le " "Vous vous êtes inscrit⋅e sur la plateforme de l'ETEAM. Merci de cliquer sur "
"lien ci-dessous pour confirmer votre inscription." "le lien ci-dessous pour confirmer votre inscription."
#: registration/templates/registration/mails/email_validation_email.html:26 #: registration/templates/registration/mails/email_validation_email.html:26
#: registration/templates/registration/mails/email_validation_email.txt:9 #: registration/templates/registration/mails/email_validation_email.txt:9
@ -3067,13 +3072,12 @@ msgstr "L'équipe de l'ETEAM"
#: registration/templates/registration/mails/payment_reminder.txt:4 #: registration/templates/registration/mails/payment_reminder.txt:4
#, python-format #, python-format
msgid "" msgid ""
"You are registered for the ETEAM. Your team %(team)s has " "You are registered for the ETEAM. Your team %(team)s has been successfully "
"been successfully validated. To end your inscription, you must pay the " "validated. To end your inscription, you must pay the amount of %(amount)s €."
"amount of %(amount)s €."
msgstr "" msgstr ""
"Vous êtes inscrit⋅e pour l'ETEAM. Votre équipe %(team)s a " "Vous êtes inscrit⋅e pour l'ETEAM. Votre équipe %(team)s a été validée avec "
"été validée avec succès. Pour finaliser votre inscription, vous devez payer " "succès. Pour finaliser votre inscription, vous devez payer le montant de "
"le montant de %(amount)s €." "%(amount)s €."
#: registration/templates/registration/mails/payment_reminder.html:24 #: registration/templates/registration/mails/payment_reminder.html:24
#: registration/templates/registration/mails/payment_reminder.txt:9 #: registration/templates/registration/mails/payment_reminder.txt:9
@ -3841,31 +3845,31 @@ msgstr "Nous contacter"
msgid "About" msgid "About"
msgstr "À propos" msgstr "À propos"
#: tfjm/templates/index_eteam.html:9 tfjm/templates/index_tfjm.html:9 #: tfjm/templates/index_eteam.html:11 tfjm/templates/index_tfjm.html:11
msgid "Welcome onto the registration site of the" msgid "Welcome onto the registration site of the"
msgstr " Bienvenue sur le site d'inscription au" msgstr " Bienvenue sur le site d'inscription au"
#: tfjm/templates/index_eteam.html:18 #: tfjm/templates/index_eteam.html:20
msgid "You want to participate to the ETEAM ?" msgid "You want to participate to the ETEAM ?"
msgstr " Tu souhaites participer à l'ETEAM ?" msgstr " Tu souhaites participer à l'ETEAM ?"
#: tfjm/templates/index_eteam.html:20 #: tfjm/templates/index_eteam.html:22
msgid "Your team is selected and already complete?" msgid "Your team is selected and already complete?"
msgstr "Ton équipe est sélectionnée et déjà formée ?" msgstr "Ton équipe est sélectionnée et déjà formée ?"
#: tfjm/templates/index_eteam.html:25 tfjm/templates/index_tfjm.html:25 #: tfjm/templates/index_eteam.html:27 tfjm/templates/index_tfjm.html:27
msgid "Register now!" msgid "Register now!"
msgstr "Inscris-toi maintenant !" msgstr "Inscris-toi maintenant !"
#: tfjm/templates/index_eteam.html:26 tfjm/templates/index_tfjm.html:26 #: tfjm/templates/index_eteam.html:28 tfjm/templates/index_tfjm.html:28
msgid "I already have an account" msgid "I already have an account"
msgstr "J'ai déjà un compte" msgstr "J'ai déjà un compte"
#: tfjm/templates/index_eteam.html:32 tfjm/templates/index_tfjm.html:32 #: tfjm/templates/index_eteam.html:34 tfjm/templates/index_tfjm.html:34
msgid "How does it work?" msgid "How does it work?"
msgstr "Comment ça marche ?" msgstr "Comment ça marche ?"
#: tfjm/templates/index_eteam.html:35 #: tfjm/templates/index_eteam.html:37
#, python-format #, python-format
msgid "" msgid ""
"To participate to the ETEAM, you must be selected by your national " "To participate to the ETEAM, you must be selected by your national "
@ -3878,7 +3882,7 @@ msgstr ""
"créer un compte sur la <strong><a href=\"%(signup_url)s\">page " "créer un compte sur la <strong><a href=\"%(signup_url)s\">page "
"d'inscription</a></strong>. Vous devrez ensuite confirmer votre adresse mail." "d'inscription</a></strong>. Vous devrez ensuite confirmer votre adresse mail."
#: tfjm/templates/index_eteam.html:44 #: tfjm/templates/index_eteam.html:46
#, python-format #, python-format
msgid "" msgid ""
"You can access your account via the <strong><a href=\"%(login_url)s\">Login</" "You can access your account via the <strong><a href=\"%(login_url)s\">Login</"
@ -3900,16 +3904,16 @@ msgstr ""
"valider votre équipe pour pouvoir travailler sur les problèmes de votre " "valider votre équipe pour pouvoir travailler sur les problèmes de votre "
"choix." "choix."
#: tfjm/templates/index_eteam.html:53 tfjm/templates/index_tfjm.html:62 #: tfjm/templates/index_eteam.html:55 tfjm/templates/index_tfjm.html:64
msgid "I have a question" msgid "I have a question"
msgstr "J'ai une question" msgstr "J'ai une question"
#: tfjm/templates/index_eteam.html:56 #: tfjm/templates/index_eteam.html:58
msgid "" msgid ""
"Do not hesitate to consult the <a href=\"/doc/\" " "Do not hesitate to consult the <a href=\"/doc/\" "
"target=\"_blank\">documentation</a> of the site, to check if the answer is " "target=\"_blank\">documentation</a> of the site, to check if the answer is "
"not already there. Also refer of course to the <a href=\"https://eteam.tfjm." "not already there. Also refer of course to the <a href=\"https://eteam.tfjm."
"org/rules/\" target=\"_blank\">𝕋𝔽𝕁𝕄² rules</a>. For any other question, do " "org/rules/\" target=\"_blank\">ETEAM rules</a>. For any other question, do "
"not hesitate to contact us by email at the address <a href=\"mailto:" "not hesitate to contact us by email at the address <a href=\"mailto:"
"eteam_moc@proton.me \"> eteam_moc@proton.me </a>." "eteam_moc@proton.me \"> eteam_moc@proton.me </a>."
msgstr "" msgstr ""
@ -3920,15 +3924,15 @@ msgstr ""
"autre question, n'hésitez pas à nous contacter par mail à l'adresse <a " "autre question, n'hésitez pas à nous contacter par mail à l'adresse <a "
"href=\"mailto:eteam_moc@proton.me\"> eteam_moc@proton.me </a>." "href=\"mailto:eteam_moc@proton.me\"> eteam_moc@proton.me </a>."
#: tfjm/templates/index_tfjm.html:18 #: tfjm/templates/index_tfjm.html:20
msgid "You want to participate to the 𝕋𝔽𝕁𝕄² ?" msgid "You want to participate to the 𝕋𝔽𝕁𝕄² ?"
msgstr " Tu souhaites participer au 𝕋𝔽𝕁𝕄² ?" msgstr " Tu souhaites participer au 𝕋𝔽𝕁𝕄² ?"
#: tfjm/templates/index_tfjm.html:20 #: tfjm/templates/index_tfjm.html:22
msgid "Your team is already complete?" msgid "Your team is already complete?"
msgstr "Ton équipe est déjà formée ?" msgstr "Ton équipe est déjà formée ?"
#: tfjm/templates/index_tfjm.html:35 #: tfjm/templates/index_tfjm.html:37
#, python-format #, python-format
msgid "" msgid ""
"To participate to the 𝕋𝔽𝕁𝕄², you just need to create an account on the " "To participate to the 𝕋𝔽𝕁𝕄², you just need to create an account on the "
@ -3939,7 +3943,7 @@ msgstr ""
"<strong><a href=\"%(signup_url)s\">page d'inscription</a></strong>. Vous " "<strong><a href=\"%(signup_url)s\">page d'inscription</a></strong>. Vous "
"devrez ensuite confirmer votre adresse mail." "devrez ensuite confirmer votre adresse mail."
#: tfjm/templates/index_tfjm.html:43 #: tfjm/templates/index_tfjm.html:45
#, python-format #, python-format
msgid "" msgid ""
"You can access your account via the <strong><a href=\"%(login_url)s\">Login</" "You can access your account via the <strong><a href=\"%(login_url)s\">Login</"
@ -3961,11 +3965,11 @@ msgstr ""
"valider votre équipe pour pouvoir travailler sur les problèmes de votre " "valider votre équipe pour pouvoir travailler sur les problèmes de votre "
"choix." "choix."
#: tfjm/templates/index_tfjm.html:52 #: tfjm/templates/index_tfjm.html:54
msgid "I can't find a team, help me!" msgid "I can't find a team, help me!"
msgstr "Je ne trouve pas d'équipe, aidez-moi !" msgstr "Je ne trouve pas d'équipe, aidez-moi !"
#: tfjm/templates/index_tfjm.html:56 #: tfjm/templates/index_tfjm.html:58
msgid "" msgid ""
"You can contact us at the address <a href=\"mailto:contact@tfjm." "You can contact us at the address <a href=\"mailto:contact@tfjm."
"org\">contact@tfjm.org</a> so that we can help you get in touch with other " "org\">contact@tfjm.org</a> so that we can help you get in touch with other "
@ -3975,7 +3979,7 @@ msgstr ""
"org\">contact@tfjm.org</a> pour que nous puissions vous mettre en relation " "org\">contact@tfjm.org</a> pour que nous puissions vous mettre en relation "
"avec d'autres participant⋅es qui cherchent également une équipe." "avec d'autres participant⋅es qui cherchent également une équipe."
#: tfjm/templates/index_tfjm.html:65 #: tfjm/templates/index_tfjm.html:67
msgid "" msgid ""
"Do not hesitate to consult the <a href=\"/doc/\" " "Do not hesitate to consult the <a href=\"/doc/\" "
"target=\"_blank\">documentation</a> of the site, to check if the answer is " "target=\"_blank\">documentation</a> of the site, to check if the answer is "
@ -3995,11 +3999,11 @@ msgstr ""
"&#109;&#46;&#111;&#114;&#103;\"> &#99;&#111;&#110;&#116;&#97;&#99;&#116;&#64;" "&#109;&#46;&#111;&#114;&#103;\"> &#99;&#111;&#110;&#116;&#97;&#99;&#116;&#64;"
"&#116;&#102;&#106;&#109;&#46;&#111;&#114;&#103; </a>." "&#116;&#102;&#106;&#109;&#46;&#111;&#114;&#103; </a>."
#: tfjm/templates/index_tfjm.html:77 #: tfjm/templates/index_tfjm.html:79
msgid "Save the dates!" msgid "Save the dates!"
msgstr "Attention aux dates !" msgstr "Attention aux dates !"
#: tfjm/templates/index_tfjm.html:78 #: tfjm/templates/index_tfjm.html:80
msgid "" msgid ""
"If you don't end your registration by the indicated deadline, you will " "If you don't end your registration by the indicated deadline, you will "
"unfortunately not be able to participate in the 𝕋𝔽𝕁𝕄²." "unfortunately not be able to participate in the 𝕋𝔽𝕁𝕄²."
@ -4007,7 +4011,7 @@ msgstr ""
"Si vous ne finalisez pas votre inscription avant la date limite indiquée, " "Si vous ne finalisez pas votre inscription avant la date limite indiquée, "
"vous ne pourrez malheureusement pas participer au 𝕋𝔽𝕁𝕄²." "vous ne pourrez malheureusement pas participer au 𝕋𝔽𝕁𝕄²."
#: tfjm/templates/navbar.html:19 tfjm/urls.py:33 #: tfjm/templates/navbar.html:19 tfjm/urls.py:34
msgid "Home" msgid "Home"
msgstr "Accueil" msgstr "Accueil"
@ -4091,16 +4095,3 @@ msgstr "Aucun résultat."
#: tfjm/templates/sidebar.html:10 tfjm/templates/sidebar.html:21 #: tfjm/templates/sidebar.html:10 tfjm/templates/sidebar.html:21
msgid "Informations" msgid "Informations"
msgstr "Informations" msgstr "Informations"
#~ msgid ""
#~ "Please note that these dates may be subject to change. If your local "
#~ "organizers gave you different dates, trust them."
#~ msgstr ""
#~ "Veuillez noter que ces dates peuvent être sujettes à changement. Si vos "
#~ "organisateur⋅rices locaux⋅ales vous ont donné des dates différentes, "
#~ "faites-leur confiance."
#~ msgid "date when solutions of round 2 are available"
#~ msgstr ""
#~ "date à partir de laquelle les solutions pour le second tour sont "
#~ "disponibles"

View File

@ -0,0 +1,77 @@
# Generated by Django 5.0.6 on 2024-06-13 08:53
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("participation", "0016_tournament_date_first_phase_and_more"),
]
operations = [
migrations.AlterField(
model_name="passage",
name="solution_number",
field=models.PositiveSmallIntegerField(
choices=[
(1, "Problem #1"),
(2, "Problem #2"),
(3, "Problem #3"),
(4, "Problem #4"),
(5, "Problem #5"),
(6, "Problem #6"),
(7, "Problem #7"),
(8, "Problem #8"),
(9, "Problem #9"),
(10, "Problem #10"),
],
verbose_name="defended solution",
),
),
migrations.AlterField(
model_name="pool",
name="round",
field=models.PositiveSmallIntegerField(
choices=[(1, "Round 1"), (2, "Round 2"), (3, "Round 3")],
verbose_name="round",
),
),
migrations.AlterField(
model_name="solution",
name="problem",
field=models.PositiveSmallIntegerField(
choices=[
(1, "Problem #1"),
(2, "Problem #2"),
(3, "Problem #3"),
(4, "Problem #4"),
(5, "Problem #5"),
(6, "Problem #6"),
(7, "Problem #7"),
(8, "Problem #8"),
(9, "Problem #9"),
(10, "Problem #10"),
],
verbose_name="problem",
),
),
migrations.AlterField(
model_name="team",
name="trigram",
field=models.CharField(
help_text="The code must be composed of 4 uppercase letters.",
max_length=4,
unique=True,
validators=[
django.core.validators.RegexValidator("^[A-Z]{3}[A-Z]*$"),
django.core.validators.RegexValidator(
"^(?!BIT$|CNO$|CRO$|CUL$|FTG$|FCK$|FUC$|FUK$|FYS$|HIV$|IST$|MST$|KKK$|KYS$|SEX$)",
message="This team code is forbidden.",
),
],
verbose_name="code",
),
),
]

View File

@ -38,13 +38,13 @@ class Team(models.Model):
) )
trigram = models.CharField( trigram = models.CharField(
max_length=settings.TEAM_CODE_LENGTH, max_length=4,
verbose_name=_("code"), verbose_name=_("code"),
help_text=format_lazy(_("The code must be composed of {nb_letters} uppercase letters."), help_text=format_lazy(_("The code must be composed of {nb_letters} uppercase letters."),
nb_letters=settings.TEAM_CODE_LENGTH), nb_letters=settings.TEAM_CODE_LENGTH),
unique=True, unique=True,
validators=[ validators=[
RegexValidator("^[A-Z]{" + str(settings.TEAM_CODE_LENGTH) + "}$"), RegexValidator("^[A-Z]{3}[A-Z]*$"),
RegexValidator(fr"^(?!{'|'.join(f'{t}$' for t in settings.FORBIDDEN_TRIGRAMS)})", RegexValidator(fr"^(?!{'|'.join(f'{t}$' for t in settings.FORBIDDEN_TRIGRAMS)})",
message=_("This team code is forbidden.")), message=_("This team code is forbidden.")),
], ],
@ -236,6 +236,12 @@ class Team(models.Model):
get_sympa_client().unsubscribe(self.email, "equipes-non-valides", False) get_sympa_client().unsubscribe(self.email, "equipes-non-valides", False)
get_sympa_client().delete_list(f"equipe-{self.trigram}") get_sympa_client().delete_list(f"equipe-{self.trigram}")
def clean(self):
if self.trigram and len(self.trigram) != settings.TEAM_CODE_LENGTH:
raise ValidationError({'trigram': _("The team code must be composed of {nb_letters} uppercase letters.")},
params={'nb_letters': settings.TEAM_CODE_LENGTH})
return super().clean()
def save(self, *args, **kwargs): def save(self, *args, **kwargs):
if not self.access_code: if not self.access_code:
# if the team got created, generate the access code, create the contact mailing list # if the team got created, generate the access code, create the contact mailing list