Bagaimana Saya Mengirim Data Kustom Di Serializer Bidang Model REST_FRAMEWORK
class FooSerializer(ModelSerializer):
foo = serializers.SerializerMethodField()
def get_foo(self, obj):
return "Foo id: %i" % obj.pk
Hero