from rest_framework import serializers from .models import Bill, Payment class BillSerializer(serializers.ModelSerializer): class Meta: model = Bill fields = ['owner', 'amount', 'due_date', 'creation_date', 'starting_date', 'ending_date', 'paid'] class PaymentSerializer(serializers.ModelSerializer): class Meta: model = Payment fields = ['owner', 'amount', 'source', 'timestamp']