Use internal documentation framework
-from django.conf.urls import url
+from django.conf.urls import url, include
+
+from rest_framework.documentation import include_docs_urls
from .routers import DefaultRouterWithNesting
from .views import (
@@ -56,9 +58,13 @@ projects.register(
)
urlpatterns = [
- url(r'^token/$', TokenObtainPairView.as_view(), name='token_obtain_pair'),
- url(r'^token/refresh/$', TokenRefreshView.as_view(), name='token_refresh'),
- url(r'^token/verify/$', TokenVerifyView.as_view(), name='token_verify'),
+ url(r'^docs/', include_docs_urls(
+ title='Read the Docs API',
+ patterns=[
+ url(r'/api/v3/', include(router.urls)),
+ ],
+ public=True),
+ ),
]
urlpatterns += router.urls
