FormularOKView a pracuje_se přesunuto ze semináře do various
This commit is contained in:
parent
5878d1bf7e
commit
c00f60b38f
7 changed files with 23 additions and 22 deletions
|
@ -23,7 +23,7 @@ from personalni.models import Resitel, Organizator, Osoba
|
|||
from . import forms as f
|
||||
from .forms import OdevzdavatkoTabulkaFiltrForm as FiltrForm
|
||||
from personalni.utils import resi_v_rocniku
|
||||
from seminar.views import formularOKView
|
||||
from various.views import formularOKView
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ from datetime import date
|
|||
import logging
|
||||
import csv
|
||||
|
||||
from seminar.views import formularOKView
|
||||
from various.views import formularOKView
|
||||
from various.autentizace.views import LoginView
|
||||
from various.autentizace.utils import posli_reset_hesla
|
||||
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<p>
|
||||
Na této stránce velmi intenzivně pracujeme.
|
||||
Za dočasnou nedostupnost se omlouváme.
|
||||
Zkuste přejít na <a href="/">titulní stránku</a>
|
||||
Zkuste přejít na <a href="/static">titulní stránku</a>
|
||||
nebo se podívat na <a href="{% url 'seminar_aktualni_zadani' %}">aktuální zadání</a>.
|
||||
</p>
|
||||
<img src="{% static '404.png' %}">
|
|
@ -1,9 +1,27 @@
|
|||
from collections.abc import Sequence
|
||||
|
||||
from django.shortcuts import render
|
||||
from django.urls import reverse
|
||||
|
||||
from various import utils
|
||||
from personalni.models import Resitel
|
||||
|
||||
|
||||
# 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)
|
||||
|
||||
|
||||
def StavDatabazeView(request):
|
||||
# nastaveni = Nastaveni.objects.get()
|
||||
problemy = utils.seznam_problemu()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from django.views.generic import FormView, ListView
|
||||
|
||||
from personalni.models import Osoba
|
||||
from seminar.views import formularOKView
|
||||
from various.views import formularOKView
|
||||
from .forms import UcastnikVyrociForm
|
||||
from .models import UcastnikVyroci
|
||||
|
||||
|
|
Loading…
Reference in a new issue