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:
@ -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
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user