mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-03 22:42:53 +02:00
Send syntheses
This commit is contained in:
@ -64,10 +64,22 @@ class Tournament(models.Model):
|
||||
verbose_name=_("year"),
|
||||
)
|
||||
|
||||
@property
|
||||
def linked_organizers(self):
|
||||
return ['<a href="{url}">'.format(url=reverse_lazy("member:information", args=(user.pk,))) + str(user) + '</a>'
|
||||
for user in self.organizers.all()]
|
||||
|
||||
@property
|
||||
def solutions(self):
|
||||
from member.models import Solution
|
||||
return Solution.objects.filter(team__tournament=self)
|
||||
return Solution.objects.filter(final=self.final) if self.final \
|
||||
else Solution.objects.filter(team__tournament=self)
|
||||
|
||||
@property
|
||||
def syntheses(self):
|
||||
from member.models import Synthesis
|
||||
return Synthesis.objects.filter(final=self.final) if self.final \
|
||||
else Synthesis.objects.filter(team__tournament=self)
|
||||
|
||||
@classmethod
|
||||
def get_final(cls):
|
||||
|
Reference in New Issue
Block a user