1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 05:18:26 +02:00

Display problem names

Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
Emmy D'Anello
2023-04-04 11:56:13 +02:00
parent 90bfc45858
commit 4357d51b9a
4 changed files with 23 additions and 12 deletions

View File

@ -431,7 +431,7 @@ class Passage(models.Model):
solution_number = models.PositiveSmallIntegerField(
verbose_name=_("defended solution"),
choices=[
(i, format_lazy(_("Problem #{problem}"), problem=i)) for i in range(1, settings.PROBLEM_COUNT + 1)
(i, format_lazy(_("Problem #{problem}"), problem=i)) for i in range(1, len(settings.PROBLEMS) + 1)
],
)
@ -585,7 +585,7 @@ class Solution(models.Model):
problem = models.PositiveSmallIntegerField(
verbose_name=_("problem"),
choices=[
(i, format_lazy(_("Problem #{problem}"), problem=i)) for i in range(1, settings.PROBLEM_COUNT + 1)
(i, format_lazy(_("Problem #{problem}"), problem=i)) for i in range(1, len(settings.PROBLEMS) + 1)
],
)