def _get_parent_modeladmin(self):
        # HACK: accessing private field.
        try:
            parentadmin = self.admin_site._registry[self.parent_model]
        except __HOLE__:
            raise ImproperlyConfigured("Model admin for '{0}' not found in admin_site!".format(self.parent_model.__name__))

        # Do some "type" checking to developers are aided in inheriting their parent ModelAdmin screens with the proper classes.
        assert isinstance(parentadmin, PlaceholderEditorBaseMixin), "The '{0}' class can only be used in admin screens which implement a PlaceholderEditor mixin class.".format(self.__class__.__name__)
        return parentadmin
dataset/ETHPy150Open edoburu/django-fluent-contents/fluent_contents/admin/placeholdereditor.py/PlaceholderEditorInline._get_parent_modeladmin