try this then clear cache on your browser path('logout/', auth_views.LogoutView.as_view(template_name ='registration/logged_out.html' ), name='logout' ),
On Sunday, July 5, 2020 at 8:58:25 PM UTC+1, Yasir Iqbal wrote:
-- On Sunday, July 5, 2020 at 8:58:25 PM UTC+1, Yasir Iqbal wrote:
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.ThanksHere is my code urls.pyfrom django.urls import pathfrom django.contrib.auth import views as auth_viewsfrom . import viewsurlpatterns=[#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 urlpath('password_change/',auth_views.PasswordChangeView. as_view(template_name=' registration/password_change_ ), name='password_form.html' change' ),]
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5b7e9d59-3ce2-4d09-9f9a-325608f75b75o%40googlegroups.com.
No comments:
Post a Comment