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