Compare commits
2 Commits
70f391420c
...
b16fe7d68e
Author | SHA1 | Date |
---|---|---|
Yohann D'ANELLO | b16fe7d68e | |
Yohann D'ANELLO | 0b48c0fa95 |
|
@ -4,7 +4,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin
|
|||
from django.contrib.auth.models import AnonymousUser
|
||||
from django.core.exceptions import PermissionDenied
|
||||
from django.db.models import Q
|
||||
from django.http import FileResponse
|
||||
from django.http import FileResponse, Http404
|
||||
from django.shortcuts import redirect
|
||||
from django.urls import reverse_lazy
|
||||
from django.utils import timezone
|
||||
|
@ -188,7 +188,11 @@ class DocumentView(LoginRequiredMixin, View):
|
|||
"""
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
try:
|
||||
doc = Document.objects.get(file=self.kwargs["file"])
|
||||
except Document.DoesNotExist:
|
||||
raise Http404(_("No %(verbose_name)s found matching the query") %
|
||||
{'verbose_name': Document._meta.verbose_name})
|
||||
|
||||
grant = request.user.admin
|
||||
|
||||
|
|
|
@ -328,7 +328,7 @@ class SolutionsView(TeamMixin, BaseFormView, SingleTableView):
|
|||
self.object_list = self.get_queryset()
|
||||
context = super().get_context_data(**kwargs)
|
||||
context["now"] = timezone.now()
|
||||
context["real_deadline"] = self.request.user.team.tournament.date_solutions + timedelta(minutes=30)
|
||||
context["real_deadline"] = self.request.user.team.future_tournament.date_solutions + timedelta(minutes=30)
|
||||
return context
|
||||
|
||||
def get_queryset(self):
|
||||
|
|
Loading…
Reference in New Issue