mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-29 17:39:48 +03:00
django 2.0+ only
This commit is contained in:
parent
37f210a455
commit
82b3e8c168
|
@ -3,14 +3,14 @@ URLConf for test suite.
|
||||||
|
|
||||||
We need only the docs urls for DocumentationRenderer tests.
|
We need only the docs urls for DocumentationRenderer tests.
|
||||||
"""
|
"""
|
||||||
from django.conf.urls import url
|
from django.urls import path
|
||||||
|
|
||||||
from rest_framework.compat import coreapi
|
from rest_framework.compat import coreapi
|
||||||
from rest_framework.documentation import include_docs_urls
|
from rest_framework.documentation import include_docs_urls
|
||||||
|
|
||||||
if coreapi:
|
if coreapi:
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
url(r'^docs/', include_docs_urls(title='Test Suite API')),
|
path('docs/', include_docs_urls(title='Test Suite API')),
|
||||||
]
|
]
|
||||||
else:
|
else:
|
||||||
urlpatterns = []
|
urlpatterns = []
|
||||||
|
|
Loading…
Reference in New Issue
Block a user