serializers.py 324 B

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