from rest_framework import serializers from rest_framework.serializers import ListSerializer from pivottable.models import Payment class PaymentSerializer(serializers.ModelSerializer): class Meta: model = Payment # fields = ['url', 'username', 'email', 'is_staff'] list_serializer = ListSerializer fields = '__all__'