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

Display notes

This commit is contained in:
Yohann D'ANELLO
2021-01-14 18:43:53 +01:00
parent ef785a5eb8
commit a97541064e
5 changed files with 88 additions and 19 deletions

View File

@ -6,7 +6,7 @@ from django.utils.text import format_lazy
from django.utils.translation import gettext_lazy as _
import django_tables2 as tables
from .models import Pool, Team, Tournament
from .models import Note, Pool, Team, Tournament
# noinspection PyTypeChecker
@ -19,7 +19,7 @@ class TeamTable(tables.Table):
class Meta:
attrs = {
'class': 'table table condensed table-striped',
'class': 'table table-condensed table-striped',
}
model = Team
fields = ('name', 'trigram',)
@ -51,7 +51,7 @@ class ParticipationTable(tables.Table):
class Meta:
attrs = {
'class': 'table table condensed table-striped',
'class': 'table table-condensed table-striped',
}
model = Team
fields = ('name', 'trigram', 'valid',)
@ -70,7 +70,7 @@ class TournamentTable(tables.Table):
class Meta:
attrs = {
'class': 'table table condensed table-striped',
'class': 'table table-condensed table-striped',
}
model = Tournament
fields = ('name', 'date',)
@ -91,8 +91,27 @@ class PoolTable(tables.Table):
class Meta:
attrs = {
'class': 'table table condensed table-striped',
'class': 'table table-condensed table-striped',
}
model = Pool
fields = ('teams', 'round', 'tournament',)
template_name = 'django_tables2/bootstrap4.html'
class NoteTable(tables.Table):
jury = tables.Column(
attrs={
"td": {
"class": "text-nowrap",
}
}
)
class Meta:
attrs = {
'class': 'table table-condensed table-striped text-center',
}
model = Note
fields = ('jury', 'defender_writing', 'defender_oral', 'opponent_writing', 'opponent_oral',
'reporter_writing', 'reporter_oral',)
template_name = 'django_tables2/bootstrap4.html'