      ]
  
  You should make sure your authentication settings include `SessionAuthentication`.
  """
  from django.conf.urls import url
  from django.contrib.auth import views
  
  app_name = 'rest_framework'
  urlpatterns = [
      url(r'^login/$', views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'),
 
</s> remove     url(r'^login/$', views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'),
    url(r'^logout/$', views.LogoutView.as_view(), name='logout'),
 </s> add     path('login/', views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'),
    path('logout/', views.LogoutView.as_view(), name='logout'), </s> remove from django.conf.urls import url
 </s> add  </s> remove from django.urls import NoReverseMatch
 </s> add from django.urls import NoReverseMatch, re_path </s> remove from django.conf.urls import include, url
from django.urls import URLResolver, path, register_converter
 </s> add from django.urls import URLResolver, include, path, re_path, register_converter
      ]
  
  You should make sure your authentication settings include `SessionAuthentication`.
  """

  from django.contrib.auth import views
  
  app_name = 'rest_framework'
  urlpatterns = [
      url(r'^login/$', views.LoginView.as_view(template_name='rest_framework/login.html'), name='login'),
keep keep keep keep replace keep keep keep keep keep
 Updated url()'s with path() and re_path() (#7492) 
rest_framework/urls.py