14 lines
529 B
Python
14 lines
529 B
Python
from django.urls import reverse_lazy
|
|
from django.contrib.auth import views as auth_views
|
|
|
|
|
|
class LoginView(auth_views.LoginView):
|
|
# Jen vezmeme vestavěný a dáme mu vhodný template a přesměrovací URL
|
|
template_name = "autentizace/login.html"
|
|
|
|
|
|
class LogoutView(auth_views.LogoutView):
|
|
# Jen vezmeme vestavěný a dáme mu vhodný template a přesměrovací URL
|
|
template_name = "autentizace/logout.html"
|
|
# Pavel: Vůbec nevím, proč to s _lazy funguje, ale bez toho to bylo rozbité.
|
|
next_page = reverse_lazy("login")
|