read_only_fields not work #8802
Unanswered
samuelchen
asked this question in
Potential Issue
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.
Uh oh!
There was an error while loading. Please reload this page.
-
I searched issues and discussions, found that
read_only_fieldsnot work with explicitly declared field or nested.But my case has no explicitly declared fields, it's directly use UserModel in Meta.
UserModelis fromget_user_model().I can
updatefields inread_only_fields, such asusername,is_superuserand etc.How do I make the read_only_fields read only ?
e.g.
Beta Was this translation helpful? Give feedback.
All reactions