Skip to content

Conversation

ppython
Copy link
Contributor

@ppython ppython commented Jan 5, 2017

Maybe a noob problem, but I got an empty list when doing:

class ExampleAdmin(NestedModelAdmin, SpecificAdmin1, SpecificAdmin2):
    def get_inline_instances(self, request, obj=None):
        inlines_inst = super(
            ExampleAdmin, self).get_inline_instances(request, obj)

Instead of getting an Inline from SpecificAdmin2...

With this patch, the MRO resolution of get_inline_instances is different and I finally get my Inline from SpecificAdmin2!

Is is something desirable for all cases?

@ppython ppython changed the title Added a super call for admin.NestedModelAdmin.get_inline_instances Added a forgotten super call for admin.NestedModelAdmin.get_inline_instances Feb 1, 2017
@ppython ppython changed the title Added a forgotten super call for admin.NestedModelAdmin.get_inline_instances Added a forgotten super call for admin.NestedModelAdmin.get_inline_instances and misuse Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant