From 0f2d2dbee9ca6ebebb07eac7533d5233279d3864 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 20 Dec 2023 15:17:31 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=B6=E4=BB=96=E7=94=9F=E4=BA=A7?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2handle=5F?= =?UTF-8?q?date?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/views.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/wpm/views.py b/apps/wpm/views.py index a2b9557c..91a7703d 100644 --- a/apps/wpm/views.py +++ b/apps/wpm/views.py @@ -382,6 +382,9 @@ class OtherLogViewSet(CustomModelViewSet): """ queryset = OtherLog.objects.all() serializer_class = OtherLogSerializer - filterset_fields = ['product'] + filterset_fields = { + "product": ["exact"], + "handle_date": ["exact", "gte", "lte"] + } search_fields = ['product'] ordering = ['-handle_date', '-create_time']