From ec170a40b570fb083e5335cee5aa504652858b35 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 19 Oct 2015 15:00:49 +0200 Subject: [PATCH] Fix url field in DuckSerializer --- api/serializers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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', + } + }