We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 25b8697 commit 7bb7fa6Copy full SHA for 7bb7fa6
1 file changed
tutorial/urls.py
@@ -1,11 +1,14 @@
1
from django.conf.urls import include, url
2
from rest_framework.schemas import get_schema_view
3
+from rest_framework.documentation import include_docs_urls
4
-schema_view = get_schema_view(title='Pastebin API')
5
+API_TITLE = 'Pastebin API'
6
+API_DESCRIPTION = 'A Web API for creating and viewing highlighted code snippets.'
7
+schema_view = get_schema_view(title=API_TITLE)
8
9
urlpatterns = [
10
url(r'^', include('snippets.urls')),
- url(r'^api-auth/',
- include('rest_framework.urls', namespace='rest_framework')),
11
+ url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
12
url(r'^schema/$', schema_view),
13
+ url(r'^docs/', include_docs_urls(title=API_TITLE, description=API_DESCRIPTION))
14
]
0 commit comments