Fix url field in DuckSerializer

This commit is contained in:
Gergely Polonkai 2015-10-19 15:00:49 +02:00
parent 0678db84df
commit ec170a40b5

View File

@ -7,4 +7,8 @@ class DuckSerializer(serializers.HyperlinkedModelSerializer):
class Meta: class Meta:
model = Duck model = Duck
fields = ('url', 'name', 'color',) fields = ('url', 'name', 'color',)
view_name = 'api:duck-detail' extra_kwargs = {
'url': {
'view_name': 'api:duck-detail',
}
}