Refactor User model: update mobile field to allow null values, enforce unique id_card, and implement user filtering API endpoint

This commit is contained in:
2025-03-26 22:49:11 +05:00
parent aa69977d63
commit ddfbeba2f4
7 changed files with 102 additions and 5 deletions

View File

@ -16,7 +16,7 @@ from .views import (
RetrieveUpdateDestroyAtollView,
ListCreateIslandView,
RetrieveUpdateDestroyIslandView,
ListUserByIDCardView,
filter_user,
)
@ -30,7 +30,7 @@ urlpatterns = [
# path("auth/", CustomAuthToken.as_view()),
path("users/", ListUserView.as_view(), name="users"),
path("users/<int:pk>/", UserDetailAPIView.as_view(), name="user-detail"),
path("users/idcard/", ListUserByIDCardView.as_view(), name="users-idcard"),
path("users/filter/", filter_user, name="filter-users"),
path("healthcheck/", healthcheck, name="healthcheck"),
path("test/", test_email, name="testemail"),
path("atolls/", ListAtollView.as_view(), name="atolls"),