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

Send syntheses

This commit is contained in:
Yohann D'ANELLO
2020-05-05 00:11:38 +02:00
parent 26eacad2fd
commit b55aa6f4f3
12 changed files with 219 additions and 50 deletions

View File

@ -2,7 +2,7 @@ import django_tables2 as tables
from django.utils.translation import gettext as _
from django_tables2 import A
from member.models import Solution
from member.models import Solution, Synthesis
from .models import Tournament, Team
@ -49,8 +49,8 @@ class SolutionTable(tables.Table):
tournament = tables.LinkColumn(
"tournament:detail",
args=[A("team.tournament.pk")],
accessor=A("team.tournament"),
args=[A("tournament.pk")],
accessor=A("tournament"),
)
file = tables.LinkColumn(
@ -75,6 +75,17 @@ class SolutionTable(tables.Table):
class SynthesisTable(tables.Table):
team = tables.LinkColumn(
"tournament:team_detail",
args=[A("team.pk")],
)
tournament = tables.LinkColumn(
"tournament:detail",
args=[A("tournament.pk")],
accessor=A("tournament"),
)
file = tables.LinkColumn(
"document",
args=[A("file")],
@ -89,8 +100,8 @@ class SynthesisTable(tables.Table):
return _("Download")
class Meta:
model = Team
fields = ("team", "team.tournament", "round", "dest", "uploaded_at", "file", )
model = Synthesis
fields = ("team", "tournament", "round", "source", "uploaded_at", "file", )
attrs = {
'class': 'table table-condensed table-striped table-hover'
}