feat: otherlog路由注册

This commit is contained in:
caoqianming 2023-11-27 13:21:14 +08:00
parent ec5c246bdc
commit 555700793f
2 changed files with 3 additions and 1 deletions

View File

@ -1,7 +1,7 @@
from django.urls import path, include
from rest_framework.routers import DefaultRouter
from apps.wpm.views import SfLogViewSet, StLogViewSet, SfLogExpViewSet, WMaterialViewSet, MlogViewSet, HandoverViewSet, AttlogViewSet
from apps.wpm.views import SfLogViewSet, StLogViewSet, SfLogExpViewSet, WMaterialViewSet, MlogViewSet, HandoverViewSet, AttlogViewSet, OtherLogViewSet
API_BASE_URL = 'api/wpm/'
@ -15,6 +15,7 @@ router.register('wmaterial', WMaterialViewSet, basename='wmaterial')
router.register('mlog', MlogViewSet, basename='mlog')
router.register('handover', HandoverViewSet, basename='handover')
router.register('attlog', AttlogViewSet, basename='attlog')
router.register('otherlog', OtherLogViewSet, basename='otherlog')
urlpatterns = [
path(API_BASE_URL, include(router.urls)),
]

View File

@ -334,4 +334,5 @@ class OtherLogViewSet(CustomModelViewSet):
queryset = OtherLog.objects.all()
serializer_class = OtherLogSerializer
filterset_fields = ['product']
search_fields = ['product']
ordering = ['-handle_date', '-create_time']