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"), ]