File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
from django .conf .urls import include , url
2
2
from rest_framework .schemas import get_schema_view
3
+ from rest_framework .documentation import include_docs_urls
3
4
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 )
5
8
6
9
urlpatterns = [
7
10
url (r'^' , include ('snippets.urls' )),
8
- url (r'^api-auth/' ,
9
- include ('rest_framework.urls' , namespace = 'rest_framework' )),
11
+ url (r'^api-auth/' , include ('rest_framework.urls' , namespace = 'rest_framework' )),
10
12
url (r'^schema/$' , schema_view ),
13
+ url (r'^docs/' , include_docs_urls (title = API_TITLE , description = API_DESCRIPTION ))
11
14
]
You can’t perform that action at this time.
0 commit comments