SOITA/users/urls.py

21 lines
773 B
Python
Raw Normal View History

2021-12-05 13:50:34 +01:00
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
2021-12-11 22:01:14 +01:00
from .views import PasswordReset, UserPasswordResetConfirmView
2021-12-05 13:50:34 +01:00
2021-12-05 15:23:29 +01:00
router = DefaultRouter(trailing_slash=False)
2021-12-05 13:50:34 +01:00
router.register("items", UserModelViewSet)
urlpatterns = [
2021-12-05 15:23:29 +01:00
path("", include(router.urls)),
path('api/token', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path('api/token/refresh', TokenRefreshView.as_view(), name='token_refresh'),
2021-12-11 22:01:14 +01:00
path("password/reset", PasswordReset.as_view()),
path("password/reset/confirm", UserPasswordResetConfirmView.as_view()),
2021-12-05 13:50:34 +01:00
]