serializers.py 349 B

1234567891011121314
  1. #序列号定义
  2. from rest_framework import serializers
  3. from rest_framework.serializers import ListSerializer
  4. from basic.models import Menu
  5. from payment.models import Payment
  6. class MenuSerializer(serializers.ModelSerializer):
  7. class Meta:
  8. model = Menu
  9. list_serializer = ListSerializer
  10. fields = '__all__'