from django.conf.urls import url
from django.contrib.auth.views import login

from django_lti_tool_provider import views as lti_views


urlpatterns = [
    url(r'', lti_views.LTIView.as_view(), name='home'),
    url('^accounts/login/$', login),
    url(r'^lti$', lti_views.LTIView.as_view(), name='lti')
]

from django.conf.urls import url
from django.contrib.auth.views import LoginView

from django_lti_tool_provider import views as lti_views


urlpatterns = [
    url(r'', lti_views.LTIView.as_view(), name='home'),
    url('^accounts/login/$', LoginView.as_view()),
    url(r'^lti$', lti_views.LTIView.as_view(), name='lti')
]

Replace contrib.auth's "login" view with LoginView.
Replace contrib.auth's "login" view with LoginView.

Cf. https://docs.djangoproject.com/en/2.1/releases/1.11/#id2

contrib.auth's login() and logout() function-based views are deprecated in favor of new class-based views LoginView and LogoutView.

  from django.conf.urls import url
- from django.contrib.auth.views import login
+ from django.contrib.auth.views import LoginView
  
  from django_lti_tool_provider import views as lti_views
  
  
  urlpatterns = [
      url(r'', lti_views.LTIView.as_view(), name='home'),
-     url('^accounts/login/$', login),
+     url('^accounts/login/$', LoginView.as_view()),
      url(r'^lti$', lti_views.LTIView.as_view(), name='lti')
  ]
  
Replace contrib.auth's "login" view with LoginView.
## Code Before:
from django.conf.urls import url
from django.contrib.auth.views import login

from django_lti_tool_provider import views as lti_views


urlpatterns = [
    url(r'', lti_views.LTIView.as_view(), name='home'),
    url('^accounts/login/$', login),
    url(r'^lti$', lti_views.LTIView.as_view(), name='lti')
]

## Instruction:
Replace contrib.auth's "login" view with LoginView.
## Code After:
from django.conf.urls import url
from django.contrib.auth.views import LoginView

from django_lti_tool_provider import views as lti_views


urlpatterns = [
    url(r'', lti_views.LTIView.as_view(), name='home'),
    url('^accounts/login/$', LoginView.as_view()),
    url(r'^lti$', lti_views.LTIView.as_view(), name='lti')
]
