|
|
@ -11,7 +11,7 @@ from django.http import Http404,HttpResponseBadRequest,HttpResponseRedirect |
|
|
|
from django.db.models import Q, Sum, Count |
|
|
|
from django.views.decorators.csrf import ensure_csrf_cookie |
|
|
|
from django.views.generic.edit import FormView, CreateView |
|
|
|
from django.views.generic.base import TemplateView |
|
|
|
from django.views.generic.base import TemplateView, RedirectView |
|
|
|
from django.contrib.auth import authenticate, login, get_user_model, logout |
|
|
|
from django.contrib.auth import views as auth_views |
|
|
|
from django.contrib.auth.models import User, Permission |
|
|
@ -1327,3 +1327,11 @@ class JakResitView(generic.ListView): |
|
|
|
|
|
|
|
def get_queryset(self): |
|
|
|
return None |
|
|
|
|
|
|
|
class AktualniRocnikRedirectView(RedirectView): |
|
|
|
permanent=False |
|
|
|
pattern_name = 'seminar_rocnik' |
|
|
|
|
|
|
|
def get_redirect_url(self, *args, **kwargs): |
|
|
|
aktualni_rocnik = m.Nastaveni.get_solo().aktualni_rocnik.rocnik |
|
|
|
return super().get_redirect_url(rocnik=aktualni_rocnik, *args, **kwargs) |
|
|
|