mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 17:22:51 +02:00
Register pools
This commit is contained in:
@ -288,6 +288,10 @@ class Pool(models.Model):
|
||||
|
||||
round = models.PositiveSmallIntegerField(
|
||||
verbose_name=_("round"),
|
||||
choices=[
|
||||
(1, format_lazy(_("Round {round}"), round=1)),
|
||||
(2, format_lazy(_("Round {round}"), round=2)),
|
||||
]
|
||||
)
|
||||
|
||||
participations = models.ManyToManyField(
|
||||
@ -306,6 +310,9 @@ class Pool(models.Model):
|
||||
def solutions(self):
|
||||
return Solution.objects.filter(participation__in=self.participations, final_solution=self.tournament.final)
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse_lazy("participation:pool_detail", args=(self.pk,))
|
||||
|
||||
def __str__(self):
|
||||
return _("Pool {round} for tournament {tournament} with teams {teams}")\
|
||||
.format(round=self.round,
|
||||
|
Reference in New Issue
Block a user