SHARE
TWEET

Untitled

a guest Aug 25th, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. ]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top