          authentication_classes=authentication_classes,
          permission_classes=permission_classes,
      )
      urls = [
          url(r'^$', docs_view, name='docs-index'),
          url(r'^schema.js$', schema_js_view, name='schema-js')
      ]
      return include((urls, 'api-docs'), namespace='api-docs')
 
</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'^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                 ret.append(url(regex, view, name=name))
 </s> add                 ret.append(re_path(regex, view, name=name))
        path('', docs_view, name='docs-index'),
        path('schema.js', schema_js_view, name='schema-js')
          authentication_classes=authentication_classes,
          permission_classes=permission_classes,
      )
      urls = [
        path('', docs_view, name='docs-index'),
        path('schema.js', schema_js_view, name='schema-js')
        path('', docs_view, name='docs-index'),
        path('schema.js', schema_js_view, name='schema-js')
      ]
      return include((urls, 'api-docs'), namespace='api-docs')
keep keep keep keep replace replace keep keep
 Updated url()'s with path() and re_path() (#7492) 
rest_framework/documentation.py