1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-07-03 22:42:53 +02:00

Use a selector to choose a problem number

This commit is contained in:
Yohann D'ANELLO
2021-01-12 18:02:00 +01:00
parent d75ba1f890
commit 170326d503
3 changed files with 37 additions and 0 deletions

View File

@ -4,12 +4,14 @@
import os
from address.models import AddressField
from django.conf import settings
from django.core.validators import RegexValidator
from django.db import models
from django.db.models import Index
from django.urls import reverse_lazy
from django.utils import timezone
from django.utils.crypto import get_random_string
from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy as _
from registration.models import VolunteerRegistration
from tfjm.lists import get_sympa_client
@ -331,6 +333,9 @@ 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)
],
)
final_solution = models.BooleanField(