Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. from django.urls import include, path
  2. from rest_framework import routers
  3. from rest_framework.authtoken.views import obtain_auth_token
  4.  
  5. from django_api.api import views
  6.  
  7. router = routers.DefaultRouter()
  8. router.register(r'users', views.UserViewSet)
  9.  
  10. urlpatterns = [
  11. path('', include(router.urls)),
  12. path('api-token-auth/', obtain_auth_token),
  13. # Include login URLs for the browsable API.
  14. path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
  15. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement