How to change field name in ModelSerializer? #9070
Unanswered
heckad
asked this question in
Question & Answer
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to find a good way but found only defining a new field and specifying its source and then remove them from
fields
which requires restoring the field type and its parameters, but I only wanted to change the name. I don't want duplicate a code and violate the basic principles of programming. Is there an easier way? Something likefield_name_mapping
inMeta
?Beta Was this translation helpful? Give feedback.
All reactions