  your API requires authentication:
  
      urlpatterns = [
          ...
          url(r'^auth/', include('rest_framework.urls'))
      ]
  
  You should make sure your authentication settings include `SessionAuthentication`.
  """
  from django.contrib.auth import views
 
</s> remove         url(r'^docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION))
 </s> add         path('docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION)) </s> remove     url(r'^swagger/$', schema_view),
 </s> add     path('swagger/', schema_view), </s> remove     url(r'^$', MockView.as_view()),
    url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')),
 </s> add     path('', MockView.as_view()),
    path('auth/', include('rest_framework.urls', namespace='rest_framework')), </s> remove             url('^excluded-cbv/$', ExcludedAPIView.as_view()),
            url('^excluded-fbv/$', excluded_fbv),
            url('^included-fbv/$', included_fbv),
 </s> add             path('excluded-cbv/', ExcludedAPIView.as_view()),
            path('excluded-fbv/', excluded_fbv),
            path('included-fbv/', included_fbv), </s> remove             url(r'^api/v1/example/?$', views.ExampleListView.as_view()),
            url(r'^api/v1/example/(?P<pk>\d+)/?$', views.ExampleDetailView.as_view()),
            url(r'^api/v1/example/(?P<pk>\d+)/sub/?$', views.ExampleDetailView.as_view()),
 </s> add             path('api/v1/example/', views.ExampleListView.as_view()),
            path('api/v1/example/<int:pk>/', views.ExampleDetailView.as_view()),
            path('api/v1/example/<int:pk>/sub/', views.ExampleDetailView.as_view()),
        path('auth/', include('rest_framework.urls'))
  your API requires authentication:
  
      urlpatterns = [
          ...
        path('auth/', include('rest_framework.urls'))
      ]
  
  You should make sure your authentication settings include `SessionAuthentication`.
  """
  from django.contrib.auth import views
keep keep keep keep replace keep keep keep keep keep
 Replace all url() calls with path() or re_path() (#7512)

* url() is deprecated in Django 3.1

* update given feedbacks on url() is deprecated in Django 3.1

* Fix test_urlpatterns.py to continue testing mixed re_path() and path()

* Fix one missed reference

Co-authored-by: sanjusci <sanju.sci9@gmail.com> 
rest_framework/urls.py