1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2025-07-04 19:44:07 +02:00
This commit is contained in:
Yohann D'ANELLO
2020-05-05 23:19:18 +02:00
parent 36bbe95fc3
commit 4093411260
3 changed files with 25 additions and 2 deletions

View File

@ -227,7 +227,10 @@ class SolutionsView(TeamMixin, BaseFormView, SingleTableView):
def get_context_data(self, **kwargs):
self.object_list = self.get_queryset()
return super().get_context_data(**kwargs)
context = super().get_context_data(**kwargs)
context["now"] = timezone.now()
context["real_deadline"] = self.request.user.team.tournament.date_solutions + timedelta(minutes=30)
return context
def get_queryset(self):
qs = super().get_queryset()
@ -341,7 +344,9 @@ class SynthesesView(TeamMixin, BaseFormView, SingleTableView):
def get_context_data(self, **kwargs):
self.object_list = self.get_queryset()
return super().get_context_data(**kwargs)
context = super().get_context_data(**kwargs)
context["now"] = timezone.now()
return context
def form_valid(self, form):
synthesis = form.instance