PolymorphicChildModelAdmin list displays base model of foreignkey fields #805
-
|
I am aware of the e.g When I display the admin list, the item is always displayed as "Trackable" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
|
I'm not sure I get this.. You have a |
Beta Was this translation helpful? Give feedback.
-
|
@bckohan I think this should be a discussion |
Beta Was this translation helpful? Give feedback.
-
|
@variable
You can display:
If you need to show data shared across multiple children, the recommended approach is to move that relationship to the parent model. Otherwise, the only workaround is a custom This limitation is intentional and consistent with Django admin’s model isolation, not a missing feature in django-polymorphic. |
Beta Was this translation helpful? Give feedback.
@variable
polymorphic_listonly works onPolymorphicParentModelAdminbecause it relies on a polymorphic queryset to resolve and display fields from different child models.PolymorphicChildModelAdminis already scoped to a single concrete child model and uses a non-polymorphic queryset, so there’s no equivalent mechanism to automatically display relationship fields that belong to other child classes.You can display:
If you need to show data shared across multiple children, the recommended approach is to move that relationship to the parent model. Otherwise, the only workaround is a custom
list_displaymeth…