1
0
mirror of https://gitlab.com/animath/si/plateforme-corres2math.git synced 2025-07-08 23:30:20 +02:00

Define the team which receives our video

This commit is contained in:
Yohann D'ANELLO
2020-10-31 13:35:00 +01:00
parent e9c56104df
commit 95e1c4f821
6 changed files with 96 additions and 18 deletions

View File

@ -20,8 +20,8 @@ from django_tables2 import SingleTableView
from magic import Magic
from registration.models import AdminRegistration
from .forms import JoinTeamForm, ParticipationForm, PhaseForm, ReceiveParticipationForm, RequestValidationForm,\
TeamForm, UploadVideoForm, ValidateParticipationForm
from .forms import JoinTeamForm, ParticipationForm, PhaseForm, ReceiveParticipationForm, RequestValidationForm, \
SendParticipationForm, TeamForm, UploadVideoForm, ValidateParticipationForm
from .models import Participation, Phase, Team, Video
from .tables import CalendarTable
@ -370,6 +370,18 @@ class SetParticipationReceiveParticipationView(AdminMixin, UpdateView):
return reverse_lazy("participation:participation_detail", args=(self.object.pk,))
class SetParticipationSendParticipationView(AdminMixin, UpdateView):
"""
Define the team where the solution will be sent.
"""
model = Participation
form_class = SendParticipationForm
template_name = "participation/send_participation_form.html"
def get_success_url(self):
return reverse_lazy("participation:participation_detail", args=(self.object.pk,))
class UploadVideoView(LoginRequiredMixin, UpdateView):
"""
Upload a solution video for a team.