1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-06-21 01:18:22 +02:00

Localize table headers

This commit is contained in:
Yohann D'ANELLO
2020-05-06 00:15:46 +02:00
parent 235d7162e5
commit 03063599a5
2 changed files with 20 additions and 7 deletions

View File

@ -1,6 +1,6 @@
import django_tables2 as tables
from django.urls import reverse_lazy
from django.utils.translation import gettext as _
from django.utils.translation import gettext_lazy as _
from django_tables2 import A
from member.models import Solution, Synthesis
@ -54,6 +54,7 @@ class SolutionTable(tables.Table):
"tournament:detail",
args=[A("tournament.pk")],
accessor=A("tournament"),
verbose_name=_("tournament"),
)
file = tables.LinkColumn(
@ -87,6 +88,7 @@ class SynthesisTable(tables.Table):
"tournament:detail",
args=[A("tournament.pk")],
accessor=A("tournament"),
verbose_name=_("tournament"),
)
file = tables.LinkColumn(
@ -111,6 +113,10 @@ class SynthesisTable(tables.Table):
class PoolTable(tables.Table):
problems = tables.Column(verbose_name=_("Problems"))
tournament = tables.Column(verbose_name=_("Tournament"))
def render_teams(self, value):
return ", ".join(team.trigram for team in value.all())