serializer.py 356 B

12345678910111213
  1. from rest_framework import serializers
  2. from rest_framework.serializers import ListSerializer
  3. from pivottable.models import Payment
  4. class PaymentSerializer(serializers.ModelSerializer):
  5. class Meta:
  6. model = Payment
  7. # fields = ['url', 'username', 'email', 'is_staff']
  8. list_serializer = ListSerializer
  9. fields = '__all__'