1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2024-12-05 02:06:52 +00:00

Better video filtering

This commit is contained in:
Yohann D'ANELLO 2020-10-19 15:49:53 +02:00
parent 07451d41d3
commit d940acb226
3 changed files with 12 additions and 4 deletions

View File

@ -54,17 +54,19 @@ class ParticipationTable(tables.Table):
class VideoTable(tables.Table):
participation_name = tables.LinkColumn(
participationname = tables.LinkColumn(
'participation:participation_detail',
args=[tables.A("participation__pk")],
verbose_name=lambda: _("name").capitalize(),
accessor="participation__name",
)
def render_participationname(self, record):
return record.participation.team.name
class Meta:
attrs = {
'class': 'table table condensed table-striped',
}
model = Team
fields = ('participation_name', 'link',)
fields = ('participationname', 'link',)
template_name = 'django_tables2/bootstrap4.html'

View File

@ -1,2 +1,4 @@
{{ object.team.name }}
{{ object.team.trigram }}
{{ object.team.trigram }}
{{ object.problem }}
{{ object.get_problem_display }}

View File

@ -1 +1,5 @@
{{ object.link }}
{{ object.participation.team.name }}
{{ object.participation.team.trigram }}
{{ object.participation.problem }}
{{ object.participation.get_problem_display }}