Call get_serializer TWICE in ModelMixins #9190
Unanswered
LeOndaz
asked this question in
Ideas & Suggestions
Replies: 1 comment
-
This seems like a bad idea. Not only would it likely be confusing, you're evading validation with the second call to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here's something that can improved, I was trying to have different serializers for input and for output, I overrode
create(...)
and it's fine. I found an improvement we could discuss that will make it super easy without interface change.Here's the current implementation of model mixins
And the rest follow the same way, call the serializer, ..., return Response.
However, If we change it to
we would be able to do this:
What do you think?
Beta Was this translation helpful? Give feedback.
All reactions