Open grahamhoyes opened 2 years ago
It looks like just flipping the order of inheritance with the existing mixin satasfies MRO and works fine:
class MyAdmin(admin.ModelAdmin, DcsicAdminMixin):
...
That being said, removing the ancestor class from DcsicAdminMixin
would still make sense and make it truly a mixin.
First off, this package is great and does just what I need it to!
I tried setting up the
DcsicAdminMixin
mixin on the admin site as the readme recommends, with an extra formfield override (not actually relevant to this example):However, this crashes the development server with the error:
I'm running Django 3.2.7 and Python 3.8.
Is there a historical reason why
DcsicAdminMixin
itself subclassesadmin.ModelAdmin
? If not, the fix should just be to not have the mixin subclass anything (or subclassobject
), and change the order that the mixin is used in the docs:If there's not a reason this is required for backwards compatability, I'd by happy to submit a PR with the changes. In the meantime, I'm just defining the
Media
class manually on my admin views.