mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 07:02:22 +00:00
Display teams selected for the final
This commit is contained in:
parent
9f22157ccf
commit
bfba07b7a2
@ -79,6 +79,10 @@ class Tournament(models.Model):
|
||||
verbose_name=_("year"),
|
||||
)
|
||||
|
||||
@property
|
||||
def teams(self):
|
||||
return self._teams if not self.final else Team.objects.filter(selected_for_final=True)
|
||||
|
||||
@property
|
||||
def linked_organizers(self):
|
||||
return ['<a href="{url}">'.format(url=reverse_lazy("member:information", args=(user.pk,))) + str(user) + '</a>'
|
||||
@ -122,7 +126,7 @@ class Team(models.Model):
|
||||
tournament = models.ForeignKey(
|
||||
Tournament,
|
||||
on_delete=models.PROTECT,
|
||||
related_name="teams",
|
||||
related_name="_teams",
|
||||
verbose_name=_("tournament"),
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user