django-polymorphic
django-polymorphic copied to clipboard
Multiple Inheritance from PolymorphicModel
class A(PolymorphicModel)
class B(PolymorphicModel)
class C(B)
class D(A, C)
When trying to make migrations for class D, I get the following The field 'polymorphic_ctype' from parent model 'A' clashes with the field 'polymorphic_ctype' from parent model 'B'.
Is there any way to differentiate between those two?
Is there more to the error? Post the entire stack trace. I use the same setup in one of my apps, and have not encountered this.
class Subscriptible(PolymorphicModel):
subscribers = djm.ManyToManyField(User)
class Postable(PolymorphicModel):
author = djm.ForeignKey(settings.AUTH_USER_MODEL)
class Answer(Postable, Subscriptible):
pass
Answer: (models.E005) The field 'polymorphic_ctype' from parent model 'postable' clashes with the field 'polymorphic_ctype' from parent model 'subscriptible'.
Issue #429 could be relevant