From 097adb063e508bdf3bd759b91064ef0866b824f5 Mon Sep 17 00:00:00 2001 From: TianyangZhang Date: Wed, 12 Nov 2025 11:13:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20fix=20=E4=BF=AE=E6=94=B9=20srm=20?= =?UTF-8?q?=E7=9A=84=20views?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/srm/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/srm/views.py b/apps/srm/views.py index 81121993..96db9b10 100644 --- a/apps/srm/views.py +++ b/apps/srm/views.py @@ -99,6 +99,7 @@ class PlatformViewSet(CustomModelViewSet): serializer_class = PlatformSerializer filterset_fields = ["p_dept"] ordering = ["-create_time", "p_dept"] + search_fields = ["p_dept"] class PlatstandingViewSet(CustomModelViewSet): @@ -109,4 +110,5 @@ class PlatstandingViewSet(CustomModelViewSet): queryset = Platstanding.objects.all() serializer_class = PlatstandingSerializer filterset_fields = ["name", "city_p", "province_p"] - ordering = ["-create_time", "name"] \ No newline at end of file + ordering = ["-create_time", "name"] + search_fields = ["name", "city_p", "province_p"] \ No newline at end of file