-
-
Notifications
You must be signed in to change notification settings - Fork 302
Description
I have several polymorphic child models with M2M fields to each other, NOT to the parent model. I'm using the raw ID widget for these fields in the admin, but the popup change list shows a list of ALL child types of child model.
It seems that django-polymorphic would be in the best position to provide a customised ForeignKeyRawIdWidget that automatically filters the parent model's change list by content type.
Is this something you would be interested in merging?
Can you provide any guidance on how it might be implemented in django-polymorphic?
I am imagining the raw ID widget would just add ?polymorphic_ctype=N to the URL for the popup link IF the foreign key pointed to a child model, and PolymorphicParentModelAdmin.get_queryset() would filter the queryset on that if set.