1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-07-04 22:24:04 +02:00

Display teams

This commit is contained in:
Yohann D'ANELLO
2020-04-29 16:59:59 +02:00
parent e865910ee3
commit f57d7554e7
7 changed files with 139 additions and 7 deletions

View File

@ -1,10 +1,16 @@
import django_tables2 as tables
from django.utils.translation import gettext as _
from django_tables2 import A
from .models import Tournament
from .models import Tournament, Team
class TournamentTable(tables.Table):
name = tables.LinkColumn(
"tournament:detail",
args=[A("pk")],
)
date_start = tables.Column(
verbose_name=_("dates").capitalize(),
)
@ -18,3 +24,12 @@ class TournamentTable(tables.Table):
attrs = {
'class': 'table table-condensed table-striped table-hover'
}
class TeamTable(tables.Table):
class Meta:
model = Team
fields = ("name", "trigram", "validation_status", )
attrs = {
'class': 'table table-condensed table-striped table-hover'
}