From bbed9433236a10556520dbae8678701656a8b090 Mon Sep 17 00:00:00 2001 From: VladSaichenko Date: Sun, 23 Aug 2020 01:16:41 +0700 Subject: [PATCH] url()'s were replaced by path, and imports were sorted in urlpatterns.py --- rest_framework/documentation.py | 6 +++--- rest_framework/urlpatterns.py | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rest_framework/documentation.py b/rest_framework/documentation.py index ce61fa6bf..53e5ab551 100644 --- a/rest_framework/documentation.py +++ b/rest_framework/documentation.py @@ -1,4 +1,4 @@ -from django.conf.urls import include, url +from django.urls import include, path from rest_framework.renderers import ( CoreJSONRenderer, DocumentationRenderer, SchemaJSRenderer @@ -82,7 +82,7 @@ def include_docs_urls( permission_classes=permission_classes, ) urls = [ - url(r'^$', docs_view, name='docs-index'), - url(r'^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') diff --git a/rest_framework/urlpatterns.py b/rest_framework/urlpatterns.py index 8c29bbc48..bed5708eb 100644 --- a/rest_framework/urlpatterns.py +++ b/rest_framework/urlpatterns.py @@ -1,5 +1,4 @@ -from django.conf.urls import include -from django.urls import URLResolver, path, re_path, register_converter +from django.urls import URLResolver, include, path, re_path, register_converter from django.urls.resolvers import RoutePattern from rest_framework.settings import api_settings