How to filter against subclass's fields with Django InheritanceManager?

105 Views Asked by At

I am using InheritanceManager from django-model-utils library. Is there a way to filter against fields of a subclass? Something like this:

from model_utils.managers import InheritanceManager
class A(models.Model):
    objects = InheritanceManager()

class B(A):
    flag = models.BooleanField()

A.objects.select_subclasses().filter(flag=True)
0

There are 0 best solutions below