How to access custom template when using auth_views?

100 views
Skip to first unread message

Developer mate

unread,
Jul 8, 2020, 6:32:55 PM7/8/20
to Django users
I am having difficulty to access my custom template when I tried to logout or password_change and I redirect to django built-in template. Only login is working fine with my login custom template.Can anyone help me please.Thanks
Here is my code urls.py 


from django.urls import path
from django.contrib.auth import views as auth_views

from . import views

urlpatterns=[

    #path('login/',views.user_login,name='login'),
    path('',views.dashboard, name='dashboard'),
    path('login/',auth_views.LoginView.as_view(),name='login'),
    path('logout/',auth_views.LogoutView.as_view(template_name='registration/logged_out.html',next_page=None),name='logout'),
    #change password url
    path('password_change/',auth_views.PasswordChangeView.as_view(template_name='registration/password_change_form.html'), name='password_change'),

    
]
Reply all
Reply to author
Forward
0 new messages