Project

Profile

Help

Issue #3587

closed

Multiple serializers doesn't work for detail viewsets types

Added by dalley about 6 years ago. Updated over 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 37
Quarter:

Description

In the "NamedModelViewSet", we overrode "get_serializer_class()" so that derivative viewsets like TaskViewSet can define different serializers for different actions. This works for Task, but it does not work for viewsets derived from other viewsets.

For instance, it is non-functional on PythonPackageContentViewSet, which inherits from ContentViewSet, which inherits from NamedModelViewSet.

Also available in: Atom PDF