<filename>django_project/api/serializers.py
from django.db.models import fields
from rest_framework.serializers import ModelSerializer
from .models import Payment

class PaymentSerializer(ModelSerializer):
    class Meta:
        model = Payment
        fields = '__all__'
<filename>django_project/api/serializers.py
from django.db.models import fields
from rest_framework.serializers import ModelSerializer
from .models import Payment

class PaymentSerializer(ModelSerializer):
    class Meta:
        model = Payment
        fields = '__all__'