|
|
@ -1,3 +1,4 @@ |
|
|
|
from django.conf import settings |
|
|
|
from django.http import HttpResponseRedirect |
|
|
|
from django.urls import reverse_lazy |
|
|
|
from django.contrib.auth import views as auth_views |
|
|
@ -16,7 +17,7 @@ class LoginView(auth_views.LoginView): |
|
|
|
""" Okopírováno z django/contrib/auth/views.py s přidáním nekonečného přihlášení """ |
|
|
|
auth_login(self.request, form.get_user()) |
|
|
|
if form.cleaned_data["disable_logout"]: |
|
|
|
form.request.session.set_expiry(365 * 24 * 3600) # rok |
|
|
|
form.request.session.set_expiry(settings.DOBA_ODHLASENI_PRI_ZASKRTNUTI_NEODHLASOVAT) |
|
|
|
return HttpResponseRedirect(self.get_success_url()) |
|
|
|
|
|
|
|
|
|
|
|