0

Problem: I am using django-material-admin in my Django Application. I am also using another third-party package django-eventlog.

The problem is I can see the models in my application. But I can't see third party models that are defined in django-eventlog.

When I try to use the plain Django Admin without django-material-admin I can see third-party models defined in django-eventlog.

Possible Cause: I believe this is happening because django-material-admin uses its own implementation of AdminSite. Even if it inherits from AdminSite, the package only uses material.admin.sites.site to register admin models. And the recommendation for custom admin views is to use material.admin.decorators.register, which also uses material.admin.sites.site.

The problem is that third-party packages will always use django.contrib.admin.site to register their admin models. As django-material-admin is not using this main site, it does not display all their admin views.

Help Needed: What could be the potential solution for the same? I don't really want to remove django-material-admin as I am already using it intensively in my application.

4

1 回答 1

0

此问题已在较新版本中得到解决

于 2019-12-11T04:40:30.133 回答