Add api-token-auth endpoint

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 81a2f0e5c2
commit f07dff7dcd
  1. 4
      api/v1/urls.py

@ -2,6 +2,7 @@ from django.urls import path, include
from rest_framework import permissions
from rest_framework.routers import DefaultRouter
from rest_framework.authtoken import views as auth_views
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
@ -47,5 +48,6 @@ urlpatterns = [
path('swagger(<str:format>.json|.yaml)', schema_view.without_ui(cache_timeout=None), name='schema-json'),
path('swagger/', schema_view.with_ui('swagger', cache_timeout=None), name='schema-swagger-ui'),
path('redoc/', schema_view.with_ui('redoc', cache_timeout=None), name='schema-redoc'),
path('', include((router.urls, 'api-root')), name='api-root')
path('api-token-auth/', auth_views.obtain_auth_token),
path('', include((router.urls, 'api-root')), name='api-root'),
]

Loading…
Cancel
Save