                  })
  
                  view = viewset.as_view(mapping, **initkwargs)
                  name = route.name.format(basename=basename)
                  ret.append(url(regex, view, name=name))
  
          return ret
  
  
  class APIRootView(views.APIView):
 
</s> remove                 new_pattern = url(regex, view, kwargs, name)
 </s> add                 new_pattern = re_path(regex, view, kwargs, name) </s> remove             root_url = url(r'^$', view, name=self.root_view_name)
 </s> add             root_url = re_path(r'^$', view, name=self.root_view_name) </s> remove         url(r'^$', docs_view, name='docs-index'),
        url(r'^schema.js$', schema_js_view, name='schema-js')
 </s> add         path('', docs_view, name='docs-index'),
        path('schema.js', schema_js_view, name='schema-js') </s> remove                 new_pattern = url(regex, include((patterns, app_name), namespace), kwargs)
 </s> add                 new_pattern = re_path(regex, include((patterns, app_name), namespace), kwargs) </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'),
                ret.append(re_path(regex, view, name=name))
                  })
  
                  view = viewset.as_view(mapping, **initkwargs)
                  name = route.name.format(basename=basename)
                ret.append(re_path(regex, view, name=name))
  
          return ret
  
  
  class APIRootView(views.APIView):
keep keep keep keep replace keep keep keep keep keep
 Updated url()'s with path() and re_path() (#7492) 
rest_framework/routers.py