mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-07-06 06:43:59 +02:00
Display passages as a table
This commit is contained in:
@ -26,7 +26,7 @@ from tfjm.views import AdminMixin
|
||||
from .forms import JoinTeamForm, NoteForm, ParticipationForm, PassageForm, PoolForm, PoolTeamsForm, \
|
||||
RequestValidationForm, TeamForm, TournamentForm, ValidateParticipationForm, SolutionForm, SynthesisForm
|
||||
from .models import Note, Participation, Passage, Pool, Team, Tournament, Solution, Synthesis
|
||||
from .tables import TeamTable, TournamentTable, ParticipationTable, PoolTable, NoteTable
|
||||
from .tables import NoteTable, PassageTable, PoolTable, TeamTable, TournamentTable, ParticipationTable
|
||||
|
||||
|
||||
class CreateTeamView(LoginRequiredMixin, CreateView):
|
||||
@ -489,6 +489,8 @@ class PoolDetailView(LoginRequiredMixin, DetailView):
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
|
||||
context["passages"] = PassageTable(self.object.passages.all())
|
||||
|
||||
notes = dict()
|
||||
for participation in self.object.participations.all():
|
||||
notes[participation] = self.object.average(participation)
|
||||
|
Reference in New Issue
Block a user