Repository navigation
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 |
Answered by
reuben
Oct 26, 2023
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()] |
0 replies
Answer selected by
reuben
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Figured it out, bit awkward but it does the trick. In the ViewSet class I override: