`The value of 'readonly_fields[0]' is not a callable, an attribute of
'CityInline', or an attribute of 'admin_checks.City'.`
Other fields like `list_editable`, `raw_id_fields`, `list_display`, etc.
would also include this value:
`The value of 'list_editable[0]' refers to 'original_release', which is
not contained in 'list_display'.`
It would be good if we can unify this and include the field name in the
`readonly_fields` checks, it also eases the understanding of the error
when using the framework.
--
Ticket URL: <https://code.djangoproject.com/ticket/34601>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => Natalia Bidart
* status: new => assigned
Comment:
There is an [https://github.com/django/django/pull/13169 old and stale PR]
for this, which I resuscitated in [
https://github.com/django/django/pull/16899 this PR].
--
Ticket URL: <https://code.djangoproject.com/ticket/34601#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/34601#comment:2>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/34601#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"89c27d867252d7c81be3de7184578db1934a9318" 89c27d86]:
{{{
#!CommitTicketReference repository=""
revision="89c27d867252d7c81be3de7184578db1934a9318"
Fixed #34601 -- Added field name to check message for
ModelAdmin.readonly_fields.
Co-authored-by: Rick van Hattem <wo...@wol.ph>
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/34601#comment:4>