Replies: 3 comments
|
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. |
0 replies
class Subscriptible(PolymorphicModel):
subscribers = djm.ManyToManyField(User)
class Postable(PolymorphicModel):
author = djm.ForeignKey(settings.AUTH_USER_MODEL)
class Answer(Postable, Subscriptible):
pass
Issue #429 could be relevant |
0 replies
|
@MiltosD Multiple inheritance from concrete models does work in Django - you have to manually specify and deconflict the primary key field names. django-polymorphic does not yet support multiple inheritance. There are a few issues to resolve (namely the ctype conflict you highlight) - but it is on the list. For now, you would need to make all but one parent abstract. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
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?
All reactions