drf-extensions icon indicating copy to clipboard operation
drf-extensions copied to clipboard

serializer_detail_class is required on DetailSerializerMixin

Open mirskiy opened this issue 9 years ago • 3 comments

Per the docs, "If you use DetailSerializerMixin and don't specify serializer_detail_class attribute, then serializer_class will be used."

However, it serializer_detail_class is not included, I get an error: AssertionError: 'StaffViewSet' should include a 'serializer_detail_class' attribute

Not a big deal, but figured docs or code should be updated to match.

Assert is https://github.com/chibisov/drf-extensions/blob/master/rest_framework_extensions/mixins.py#L24

mirskiy avatar Jul 16 '16 23:07 mirskiy

PR welcome :)

auvipy avatar Jul 17 '16 03:07 auvipy

Sure, which do you want changed - code or docs?

mirskiy avatar Jul 18 '16 18:07 mirskiy

the docs should be the first if the code changes are not that vital :)

auvipy avatar Jul 18 '16 19:07 auvipy