Multiple inheritance from models.Model and admin.ModelAdmin
131 views
Skip to first unread message
Lee
unread,
May 31, 2011, 1:36:51 PM5/31/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
I'm trying to create a class that inherits from both models.Model and
admin.ModelAdmin, so that I can use models.ManyToManyField and
save_model() from admin.ModelAdmin. Unfortunately this combination
gives "metaclass conflict: the metaclass of a derived class must be a
(non-strict) subclass of the metaclasses of all its bases". I've
googled on the error message and tried a couple of the suggestions but
with no luck. Anyone know the correct way of doing this?
Thanks for any help.
Lee
Lee
unread,
May 31, 2011, 4:11:01 PM5/31/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Discovered that save_model() is still available even if I don't
inherit admin.ModelAdmin, which avoids the metaclass conflict.