diff --git a/api/serializers.py b/api/serializers.py index 01b5dec..200ce20 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -7,4 +7,8 @@ class DuckSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = Duck fields = ('url', 'name', 'color',) - view_name = 'api:duck-detail' + extra_kwargs = { + 'url': { + 'view_name': 'api:duck-detail', + } + }