#36359: id_for_label undefined for AdminReadonlyField
-----------------------------------+--------------------------------------
     Reporter:  Marc Sommerhalder  |                    Owner:  (none)
         Type:  Bug                |                   Status:  closed
    Component:  contrib.admin      |                  Version:  5.2
     Severity:  Normal             |               Resolution:  invalid
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------
Changes (by Natalia Bidart):

 * resolution:   => invalid
 * status:  new => closed

Comment:

 Hello Marc Sommerhalder, thanks for taking the time to report this and for
 referencing the relevant code.

 You're correct that `AdminReadonlyField` does not define `id_for_label`.
 However, from what I can see, it's only accessed conditionally (i.e. only
 if it's already defined) so there doesn’t appear to be any resulting error
 or broken behavior in the admin output:
 {{{
 {% if field.field.id_for_label %} id="{{ field.field.id_for_label
 }}_helptext"{% endif %}
 }}}

 To better understand the problem you're experiencing, could you clarify
 what concrete issue you're observing in practice? For example, is there a
 traceback, rendering problem, or integration issue that this is causing?
 That would help determine whether this needs a code change or if the
 current behavior is acceptable.

 I'll close as `invalid` for now but please reopen if you can provide
 further details (ideally a test case failing or a small Django test
 project to reproduce the error or the issue you are getting). You can also
 reach out in the Django Forum for further assistance
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36359#comment:1>
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 visit 
https://groups.google.com/d/msgid/django-updates/01070196829872eb-44609f1b-d10e-4e9b-a1d5-8e4cec908538-000000%40eu-central-1.amazonses.com.

Reply via email to