I have three different abstract model base classes . . . I’d like to use them in multiple inheritance, sort of like Mixins. Any problems with this?
E.g.,
class TaggableBase(models.Model):
. . .
class Meta:
abstract = True
class TimeStampedBase(models.Model):
. . .
class Meta:
abstract = True
class OrganizationalBase(models.Model):
. . .
class Meta:
abstract = True
class MyTimeStampedTaggableOrganizationalModel(OrganizationalBase, TimeStampedBase, TaggableBase):
. . .
Sounds like for what you’re trying to do, mixins really are the best fit. A simple google search will find lots of articles on implementing mixins in python, such as this one. I’m not sure multiple inheritance is the best way to go about doing it, so you might want to explore all the other options. What else have you thought about?