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

Display team solutions

This commit is contained in:
Yohann D'ANELLO
2020-04-30 01:20:50 +02:00
parent 3fdda5a030
commit f08f52c129
5 changed files with 44 additions and 7 deletions

View File

@ -241,6 +241,7 @@ class Solution(Document):
class Meta:
verbose_name = _("solution")
verbose_name_plural = _("solutions")
unique_together = ('team', 'problem',)
def __str__(self):
return _("Solution of team {trigram} for problem {problem}")\
@ -265,6 +266,14 @@ class Synthesis(Document):
verbose_name=_("dest"),
)
round = models.PositiveSmallIntegerField(
choices=[
(1, _("Round 1")),
(2, _("Round 2")),
],
verbose_name=_("round"),
)
def save(self, **kwargs):
self.type = "synthesis"
super().save(**kwargs)