[Answered ]-DRF display nested JSON

1👍

Change your serializer like this:

class WalletInstanceSerializer(serializers.ModelSerializer):
    owner = serializers.ReadOnlyField(source='owner.id')
    entry = BudgetEntrySerializer(many=True, read_only=True)
    class Meta:
        model = WalletInstance
        fields = '__all__'

Leave a comment