‘django.contrib.auth.views’ has no attribute ‘logout’

[ad_1]

AttributeError: module ‘django.contrib.auth.views’ has no attribute ‘login’
from django.contrib.auth import views as auth_views

urlpatterns = [
   url( r'^login/$',auth_views.LoginView.as_view(template_name="useraccounts/login.html"), name="login"),
]
‘django.contrib.auth.views’ has no attribute ‘logout’
Open urls.py and replace:

django.contrib.auth.views.login with django.contrib.auth.views.LoginView

django.contrib.auth.views.logout with django.contrib.auth.views.LogoutView

[ad_2]

Please follow and like us:
Content Protection by DMCA.com