#32336: Allow functions in ModelAdmin.readonly_fields.
-------------------------------+-----------------------------------------
Reporter: Tim McCurrach | Owner: Tim McCurrach
Type: New feature | Status: closed
Component: contrib.admin | Version: 3.1
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+-----------------------------------------
Changes (by Mariusz Felisiak):
* status: assigned => closed
* type: Bug => New feature
* resolution: => wontfix
Comment:
Functions are not a supported in `ModelAdmin.readonly_fields`, see
[https://docs.djangoproject.com/en/3.1/ref/contrib/admin/#django.contrib.admin.ModelAdmin.readonly_fields
docs]:
> ''"A read-only field can not only display data from a model’s field, it
can also display the output of a model’s method or a method of the
ModelAdmin class itself."''
I agree with Tim that it's not worth complexity.
--
Ticket URL: <https://code.djangoproject.com/ticket/32336#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/071.734a63605e6913c9e527206e4d500825%40djangoproject.com.