from rest_framework.viewsets import ModelViewSet from basic.models import Menu from basic.serializer import MenuSerializer class MenuView(ModelViewSet): queryset = Menu.objects.all() serializer_class = MenuSerializer pagination_class = None filter_fields = {'code': ['exact'], 'parent': ['exact']}