serializer.py 293 B

1234567891011
  1. from rest_framework import serializers
  2. from rest_framework.serializers import ListSerializer
  3. from payment.models import Payment
  4. class PaymentSerializer(serializers.ModelSerializer):
  5. class Meta:
  6. model = Payment
  7. list_serializer = ListSerializer
  8. fields = '__all__'