factory/apps/wpmw/views.py

18 lines
515 B
Python

from apps.utils.viewsets import CustomModelViewSet, CustomGenericViewSet
from apps.utils.mixins import CustomListModelMixin
from apps.wpmw.models import Wpr, WprDefect
from apps.wpmw.serializers import WprSerializer
class WprViewSet(CustomListModelMixin, CustomGenericViewSet):
"""动态产品
动态产品
"""
perms_map = {"get": "*"}
queryset = Wpr.objects.all()
serializer_class = WprSerializer
ordering = ["number"]
ordering_fields = ["number", "create_time", "update_time"]