#序列号定义 from rest_framework import serializers from rest_framework.serializers import ListSerializer from basic.models import Menu from payment.models import Payment class MenuSerializer(serializers.ModelSerializer): class Meta: model = Menu list_serializer = ListSerializer fields = '__all__'