Added yet another hack to keep the child admin site happy.

This really validates a different solution to the child admin layout,
e.g. by registering the models in the regular admin site.
fix_request_path_info
Diederik van der Boor 2016-02-17 12:26:49 +01:00
parent 39d2da9e68
commit 14a5417891
1 changed files with 1 additions and 0 deletions

View File

@ -126,6 +126,7 @@ class PolymorphicParentModelAdmin(admin.ModelAdmin):
def __init__(self, model, admin_site, *args, **kwargs):
super(PolymorphicParentModelAdmin, self).__init__(model, admin_site, *args, **kwargs)
self._child_admin_site = self.admin_site.__class__(name=self.admin_site.name)
self._child_admin_site.get_app_list = lambda request: () # HACK: workaround for Django 1.9
self._is_setup = False
def _lazy_setup(self):