Reputation: 243
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)
Upvotes: 1
Views: 102