|
|
@ -1,5 +1,4 @@ |
|
|
|
from django.shortcuts import get_object_or_404, render |
|
|
|
from django.urls import reverse |
|
|
|
from django.core.exceptions import ObjectDoesNotExist |
|
|
|
from django.views import generic |
|
|
|
from django.views.generic.base import RedirectView |
|
|
@ -11,7 +10,6 @@ from personalni.models import Organizator |
|
|
|
from vysledkovky.utils import VysledkovkaRocniku |
|
|
|
|
|
|
|
from django.utils import timezone |
|
|
|
from collections.abc import Sequence |
|
|
|
|
|
|
|
|
|
|
|
# ze starého modelu |
|
|
@ -39,7 +37,7 @@ from collections.abc import Sequence |
|
|
|
# nastaveni = get_object_or_404(Nastaveni) |
|
|
|
# context = super().get_context_data(**kwargs) |
|
|
|
# verejne = nastaveni.aktualni_cislo.verejne() |
|
|
|
# context['verejne'] = verejne |
|
|
|
# context['verejne'] = verejne |
|
|
|
# return context |
|
|
|
|
|
|
|
def AktualniZadaniView(request): |
|
|
@ -224,21 +222,6 @@ class CojemamOrganizatoriStariView(generic.ListView): |
|
|
|
id__in=aktivniOrganizatori()).order_by('-organizuje_do') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Interní, nemá se nikdy objevit v urls (jinak to účastníci vytrolí) |
|
|
|
def formularOKView(request, text='', dalsi_odkazy: Sequence[tuple[str, str]] = ()): |
|
|
|
template_name = 'seminar/formular_ok.html' |
|
|
|
odkazy = list(dalsi_odkazy) + [ |
|
|
|
# (Text, odkaz) |
|
|
|
('Vrátit se na titulní stránku', reverse('titulni_strana')), |
|
|
|
('Zobrazit aktuální zadání', reverse('seminar_aktualni_zadani')), |
|
|
|
] |
|
|
|
context = { |
|
|
|
'odkazy': odkazy, |
|
|
|
'text': text, |
|
|
|
} |
|
|
|
return render(request, template_name, context) |
|
|
|
|
|
|
|
#------------------ Jak řešit - možná má být udělané úplně jinak |
|
|
|
|
|
|
|
class JakResitView(generic.ListView): |
|
|
|