I have a QuerySetMixin
in a model manager:
models.py:
class MyModel(models.Model):
objects = SoftDeletableManager()
managers.py:
class SoftDeletableManager(SoftDeletableManagerMixin, models.Manager):
pass
class SoftDeletableQuerySet(QuerySet):
pass
class SoftDeletableManagerMixin:
_queryset_class = SoftDeletableQuerySet
def get_queryset(self):
return self._queryset_class(
model=self.model,
using=self._db,
**kwargs).filter(is_removed=False)
I want to define a second QuerySetMixin
that inheits the results of the SoftDeletableManagerMixin
and filters them. How do I do this?
E.g.
class MyManagerMixin:
def get_queryset(self):
return self.[inherit other querysets].filter(mynewfilter=True)