2025-01-20 14:33:03 +05:00
|
|
|
from django.urls import path
|
|
|
|
|
|
|
|
|
|
|
|
from knox import views as knox_views
|
|
|
|
from .views import (
|
|
|
|
LoginView,
|
|
|
|
CreateUserView,
|
|
|
|
ManageUserView,
|
|
|
|
KnoxTokenListApiView,
|
|
|
|
ListUserView,
|
|
|
|
UserDetailAPIView,
|
|
|
|
healthcheck,
|
|
|
|
test_email,
|
2025-01-24 11:43:18 +05:00
|
|
|
ListAtollView,
|
|
|
|
CreateAtollView,
|
2025-01-20 20:59:16 +05:00
|
|
|
RetrieveUpdateDestroyAtollView,
|
|
|
|
ListCreateIslandView,
|
|
|
|
RetrieveUpdateDestroyIslandView,
|
2025-01-24 11:43:18 +05:00
|
|
|
ListUserByIDCardView,
|
2025-01-20 14:33:03 +05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
path("create/", CreateUserView.as_view(), name="create"),
|
|
|
|
path("profile/", ManageUserView.as_view(), name="profile"),
|
|
|
|
path("login/", LoginView.as_view(), name="knox_login"),
|
|
|
|
path("logout/", knox_views.LogoutView.as_view(), name="knox_logout"),
|
|
|
|
path("logoutall/", knox_views.LogoutAllView.as_view(), name="knox_logoutall"),
|
|
|
|
path("tokens/", KnoxTokenListApiView.as_view(), name="knox_tokens"),
|
|
|
|
# path("auth/", CustomAuthToken.as_view()),
|
|
|
|
path("users/", ListUserView.as_view(), name="users"),
|
|
|
|
path("users/<int:pk>/", UserDetailAPIView.as_view(), name="user-detail"),
|
2025-01-24 11:43:18 +05:00
|
|
|
path("users/idcard/", ListUserByIDCardView.as_view(), name="users-idcard"),
|
2025-01-20 14:33:03 +05:00
|
|
|
path("healthcheck/", healthcheck, name="healthcheck"),
|
|
|
|
path("test/", test_email, name="testemail"),
|
2025-01-24 11:43:18 +05:00
|
|
|
path("atolls/", ListAtollView.as_view(), name="atolls"),
|
|
|
|
path("atolls/new/", CreateAtollView.as_view(), name="atoll-new"),
|
2025-01-20 20:59:16 +05:00
|
|
|
path(
|
|
|
|
"atolls/<int:pk>/",
|
|
|
|
RetrieveUpdateDestroyAtollView.as_view(),
|
|
|
|
name="atoll-detail",
|
|
|
|
),
|
|
|
|
path("islands/", ListCreateIslandView.as_view(), name="islands"),
|
|
|
|
path(
|
|
|
|
"islands/<int:pk>/",
|
|
|
|
RetrieveUpdateDestroyIslandView.as_view(),
|
|
|
|
name="island-detail",
|
|
|
|
),
|
2025-01-20 14:33:03 +05:00
|
|
|
]
|