Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from django.urls import include, path
- from rest_framework import routers
- from rest_framework.authtoken.views import obtain_auth_token
- from django_api.api import views
- router = routers.DefaultRouter()
- router.register(r'users', views.UserViewSet)
- urlpatterns = [
- path('', include(router.urls)),
- path('api-token-auth/', obtain_auth_token),
- # Include login URLs for the browsable API.
- path('api-auth/', include('rest_framework.urls', namespace='rest_framework'))
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement