I have these models:
def Foo(Models.model): size = models.IntegerField() # other fields def is_active(self): if check_condition:
You can't filter on methods, however if the is_active method on Foo checks an attribute on Foo, you can use the double-underscore syntax like Bar.objects.filter(foo__is_active_attribute=True)
Bar.objects.filter(foo__is_active_attribute=True)