[Answered ]-Django rest framework serializer with extra field

2👍

Just add the field in the serializer as a normal field.

class AuthorSerializer(serializers.ModelSerializer):
    middle_name = serializers.CharField()
    class Meta:
        model = Author
        fields = ('first_name', 'last_name', 'middle_name', 'email')
👤Todor

Leave a comment