mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-05 04:24:04 +02:00
Send solutions
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
from django import forms
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from member.models import TFJMUser
|
||||
from member.models import TFJMUser, Solution, Synthesis
|
||||
from tfjm.inputs import DatePickerInput, DateTimePickerInput, AmountInput
|
||||
from tournament.models import Tournament, Team
|
||||
|
||||
@ -42,3 +42,20 @@ class JoinTeam(forms.Form):
|
||||
label=_("Access code"),
|
||||
max_length=6,
|
||||
)
|
||||
|
||||
|
||||
class SolutionForm(forms.ModelForm):
|
||||
problem = forms.ChoiceField(
|
||||
label=_("Problem"),
|
||||
choices=[(str(i), _("Problem #{problem:d}").format(problem=i)) for i in range(1, 9)],
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = Solution
|
||||
fields = ('file', 'problem',)
|
||||
|
||||
|
||||
class SynthesisForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Synthesis
|
||||
fields = ('file', 'dest',)
|
||||
|
Reference in New Issue
Block a user