mirror of
https://github.com/etnguyen03/tjdests.git
synced 2025-04-21 02:00:16 -04:00
chore(authentication): use built in LoginView
This commit is contained in:
parent
b9c8517b82
commit
0b4f03af36
|
@ -1,4 +1,4 @@
|
|||
from django.contrib.auth.views import LogoutView
|
||||
from django.contrib.auth import views as auth_views
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
@ -7,7 +7,7 @@ app_name = "authentication"
|
|||
|
||||
urlpatterns = [
|
||||
path("", views.IndexView.as_view(), name="index"),
|
||||
path("login", views.LoginViewCustom.as_view(), name="login"),
|
||||
path("logout", LogoutView.as_view(), name="logout"),
|
||||
path("login", auth_views.LoginView.as_view(template_name="authentication/login.html"), name="login"),
|
||||
path("logout", auth_views.LogoutView.as_view(), name="logout"),
|
||||
path("tos", views.accept_tos_view, name="tos"),
|
||||
]
|
||||
|
|
|
@ -49,7 +49,3 @@ def accept_tos_view(request: HttpRequest) -> HttpResponse:
|
|||
context = {"form": form}
|
||||
|
||||
return render(request, "authentication/accept_tos.html", context=context)
|
||||
|
||||
|
||||
class LoginViewCustom(LoginView):
|
||||
template_name = "authentication/login.html"
|
||||
|
|
Loading…
Reference in New Issue
Block a user