17 lines
527 B
Python
17 lines
527 B
Python
|
from rest_framework.routers import DefaultRouter
|
||
|
from django.urls import include
|
||
|
from django.urls import path
|
||
|
from users.views import UserModelViewSet
|
||
|
from rest_framework_simplejwt.views import TokenObtainPairView
|
||
|
from rest_framework_simplejwt.views import TokenRefreshView
|
||
|
|
||
|
|
||
|
router = DefaultRouter()
|
||
|
router.register("items", UserModelViewSet)
|
||
|
|
||
|
urlpatterns = [
|
||
|
path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
|
||
|
path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
|
||
|
]
|
||
|
|