#26502: Lookup of attribute 'id' on model inheritance models in InlineModelAdmin
fails when using fk_name of parent model
-------------------------------------+-------------------------------------
     Reporter:  Braintelligence      |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  closed
    Component:  Forms                |                  Version:  1.8
     Severity:  Normal               |               Resolution:  invalid
     Keywords:  id, model            |             Triage Stage:
  inheritance, inherited model,      |  Unreviewed
  inline                             |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by timgraham):

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


Comment:

 The issue is that the field uses a hidden widget by default so the HTML
 uses a
 
[https://github.com/django/django/blob/2c4c67af94318b15df7d9d37b936e07e8168bc73/django/contrib/admin/templates/admin/includes/fieldset.html#L7
 "hidden" CSS class] triggered by
 
[https://github.com/django/django/blob/2c4c67af94318b15df7d9d37b936e07e8168bc73/django/contrib/admin/helpers.py#L101-L104
 Fieldline.has_visible_field]. You could likely change the widget in a
 custom admin form to workaround this.

 It might make sense to try to allow `readonly_fields` to override override
 the widget automatically, but I'm not sure if a solution is feasible or if
 it might cause some other problems. In any case, let's open a separate
 ticket if you want to pursue such a solution since we've deviated quite a
 bit from the original report. Thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/26502#comment:14>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/073.750cd2cb3f128eff2362b776fc81294a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to