url()'s were replaced by path, and imports were sorted in urlpatterns.py

This commit is contained in:
VladSaichenko 2020-08-23 01:16:41 +07:00
parent 71ab8974b0
commit bbed943323
2 changed files with 4 additions and 5 deletions

View File

@ -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')

View File

@ -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