better document common behavior of readonly_fields and list_display
|Reported by:||Daniele Procida||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I was stunned to find that I could use a model's method as a readonly_field in admin. There doesn't seem to be any hint of this in the documentation - if there is, I have missed it.
It's a really useful bit of functionality, and can give valuable feedback to the user about the current state of the object they are editing, so I am quite surprised not to see it mentioned and explained more fully.
Also, although https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.fields says of it "New in Django 1.4: Please see the release notes" there's no mention of readonly_fields at https://docs.djangoproject.com/en/dev/releases/1.4/.
Finally, https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.readonly_fields doesn't mention "New in Django 1.4" - should it?
If I have understood this situation correctly, I'm happy to do some work on the relevant documentation.
Change History (6)
comment:1 Changed 4 years ago by
|Summary:||readonly_fields poorly documented → better document common behavior of readonly_fields and list_display|
|Triage Stage:||Unreviewed → Accepted|
|Version:||1.4 → master|