Compare commits

...

2 Commits

1 changed files with 3 additions and 1 deletions

View File

@ -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"]
ordering = ["-create_time", "name"]
search_fields = ["name", "city_p", "province_p"]