Answer the question
In order to leave comments, you need to log in
How to add multiple mixins to admin panel?
I have two admin mixins. Each adds something different to actions (like https://github.com/jrief/django-admin-sortable2/bl... ). Is it possible to make both of them work? If I just inherit from both of them, the first one mentioned will work.
Answer the question
In order to leave comments, you need to log in
The mechanism is
class A:
def say(self):
print('Hello')
class B:
def say(self):
print('HI')
class C(A, B):
def say(self):
A.say(self)
B.say(self)
с = С()
c.say() # Hello \n HI
def get_actions(self):
Mixin1.get_actions(self)
Mixin2.get_actions(self)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question