Replies: 1 comment
-
I think you also need to pass the class UserAdmin(ModelAdmin, model=User):
form_overrides = dict(status=RadioField)
form_args = dict(status=dict(choices=[True, False])) But the UI is not working correctly, feel free to create a PR for it. |
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
-
I try to use
RadioField
insteadSelectField
for enum column, But usingform_overrides
does not work.Result:
The reason is
form_overrides
just return the basic RadioField, with no choices.So there is a better way to realize it?
Beta Was this translation helpful? Give feedback.
All reactions