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

Display notes

This commit is contained in:
Yohann D'ANELLO
2021-01-14 18:43:53 +01:00
parent ef785a5eb8
commit a97541064e
5 changed files with 88 additions and 19 deletions

View File

@ -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
from .tables import TeamTable, TournamentTable, ParticipationTable, PoolTable, NoteTable
class CreateTeamView(LoginRequiredMixin, CreateView):
@ -517,6 +517,7 @@ class PassageDetailView(LoginRequiredMixin, DetailView):
context = super().get_context_data(**kwargs)
if self.request.user.registration in self.object.pool.juries.all():
context["my_note"] = Note.objects.get(passage=self.object, jury=self.request.user.registration)
context["notes"] = NoteTable([note for note in self.object.notes.all() if note])
return context