mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-02-06 10:13:01 +00:00
Better video filtering
This commit is contained in:
parent
07451d41d3
commit
d940acb226
@ -54,17 +54,19 @@ class ParticipationTable(tables.Table):
|
|||||||
|
|
||||||
|
|
||||||
class VideoTable(tables.Table):
|
class VideoTable(tables.Table):
|
||||||
participation_name = tables.LinkColumn(
|
participationname = tables.LinkColumn(
|
||||||
'participation:participation_detail',
|
'participation:participation_detail',
|
||||||
args=[tables.A("participation__pk")],
|
args=[tables.A("participation__pk")],
|
||||||
verbose_name=lambda: _("name").capitalize(),
|
verbose_name=lambda: _("name").capitalize(),
|
||||||
accessor="participation__name",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def render_participationname(self, record):
|
||||||
|
return record.participation.team.name
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
attrs = {
|
attrs = {
|
||||||
'class': 'table table condensed table-striped',
|
'class': 'table table condensed table-striped',
|
||||||
}
|
}
|
||||||
model = Team
|
model = Team
|
||||||
fields = ('participation_name', 'link',)
|
fields = ('participationname', 'link',)
|
||||||
template_name = 'django_tables2/bootstrap4.html'
|
template_name = 'django_tables2/bootstrap4.html'
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
{{ object.team.name }}
|
{{ object.team.name }}
|
||||||
{{ object.team.trigram }}
|
{{ object.team.trigram }}
|
||||||
|
{{ object.problem }}
|
||||||
|
{{ object.get_problem_display }}
|
||||||
|
@ -1 +1,5 @@
|
|||||||
{{ object.link }}
|
{{ object.link }}
|
||||||
|
{{ object.participation.team.name }}
|
||||||
|
{{ object.participation.team.trigram }}
|
||||||
|
{{ object.participation.problem }}
|
||||||
|
{{ object.participation.get_problem_display }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user