-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Its no work when you make your model admin readonly #71
Comments
I can confirm I'm still having this issue. Is it possible this should be fixed in Django itself? It looks like when you make a field read-only it shows a plain-text representation instead of the appropriate widget. It would make more sense if Django modified only the default widget when a field is set to read-only. I briefly looked at the Django docs and didn't see anything to suggest this is intended behaviour. |
This StackOverflow answer (from 2013) seems to confirm it's a Django behaviour:
|
Have you found a work-a-round? |
Has anyone found a workaround for this? I'm using Django 5.1 and v2.0.1 |
Description
when I make my model readonly widget not work !
`class ReadOnlyAdminModel(admin.ModelAdmin):
formfield_overrides = {
models.JSONField: {'widget': JSONEditorWidget},
}
`
What I Did
The text was updated successfully, but these errors were encountered: