mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-25 20:22: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"),
|
verbose_name=_("year"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def teams(self):
|
||||||
|
return self._teams if not self.final else Team.objects.filter(selected_for_final=True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def linked_organizers(self):
|
def linked_organizers(self):
|
||||||
return ['<a href="{url}">'.format(url=reverse_lazy("member:information", args=(user.pk,))) + str(user) + '</a>'
|
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 = models.ForeignKey(
|
||||||
Tournament,
|
Tournament,
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
related_name="teams",
|
related_name="_teams",
|
||||||
verbose_name=_("tournament"),
|
verbose_name=_("tournament"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user