1
0
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:
Yohann D'ANELLO
2020-05-04 23:37:21 +02:00
parent 9499e10524
commit 26eacad2fd
9 changed files with 118 additions and 21 deletions

View File

@ -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',)