您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122
  1. import rest_framework_simplejwt.views
  2. import djoser.views
  3. from django.urls import include, path
  4. from rest_framework.routers import DefaultRouter
  5. from api import views
  6. router = DefaultRouter()
  7. router.register(r"passwords", views.PasswordViewSet, basename="passwords")
  8. router.register(
  9. r"encrypted_password_profiles",
  10. views.EncryptedPasswordProfileViewSet,
  11. basename="encrypted_password_profiles",
  12. )
  13. router.register(r"auth/register", djoser.views.UserViewSet, basename="auth_register")
  14. urlpatterns = [
  15. path("", include(router.urls)),
  16. path("tokens/auth/", views.BackwardCompatibleTokenObtainPairView.as_view()),
  17. path("auth/", include("djoser.urls")),
  18. path("auth/", include("djoser.urls.jwt")),
  19. ]