mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-22 15:58:24 +02:00
First interface to start draws
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
@ -278,6 +278,13 @@ class Tournament(models.Model):
|
||||
return Synthesis.objects.filter(final_solution=True)
|
||||
return Synthesis.objects.filter(participation__tournament=self)
|
||||
|
||||
@property
|
||||
def best_format(self):
|
||||
n = len(self.participations.filter(valid=True).all())
|
||||
fmt = [n] if n <= 5 else [3] * (n // 3 - 1) + [3 + n % 3]
|
||||
return '+'.join(map(str, fmt))
|
||||
|
||||
|
||||
def get_absolute_url(self):
|
||||
return reverse_lazy("participation:tournament_detail", args=(self.pk,))
|
||||
|
||||
|
Reference in New Issue
Block a user