Fix compatibility with django-polymorphic 4.6 (complete) - #280
Conversation
|
@fdintino Any chance we can get this merged and released? With Django 4.2 reaching EOL, this is a blocker for upgrading to Django 5.2 when using |
|
The reason I haven't merged this yet is that the logic here is very different than what was in I would be more inclined to merge this if the logic was functionally identical. At the very least it needs to be using model_cls = self.formset.model.__class__
sub_models = [
sub_cls
for sub_cls in model_cls.__subclasses__()
if model_cls in sub_cls._meta.parents
] |
254b04d to
ac837ce
Compare
@fdintino Okay, sorry, I was not knowledgeable in this codebase. I just tried to implement your suggested approach, maybe it is more correct now? |
|
@fdintino not to harass you, but think you could review this one again, please? |
|
Interestingly, with Django 6, this seems not a problem anymore. |
|
@djmaze It's not actually Django 6 that determines this — the trigger is the django-polymorphic version, not the Django version.
I just reproduced this on Django 6.0.6 + django-polymorphic 4.11.5 + django-nested-admin 4.1.6 — opening the admin add page for a So this PR is still needed. fdintino's suggested |
As the author of #279 is not responsive, here is a new PR which should fix the remaining problems.