No way to override renderer_classes for single (non-@action) method of ViewSet #9151
-
I'm trying to override renderer_classes just for the Setting the Using the Trying to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Figured it out, bit awkward but it does the trick. In the ViewSet class I override: def get_renderers(self):
if self.action == 'create':
return [RendererA(), RendererB()]
else:
return [RendererA()] |
Beta Was this translation helpful? Give feedback.
Figured it out, bit awkward but it does the trick. In the ViewSet class I override: