Hello, I have these models:
def Foo(Models.model):
size = models.IntegerField()
....some other vars...
def is_active(self):
if ...checks something here...
return True
else:
return False
def Bar(Models.model):
foo = models.ForeignKey("Foo")
....some other vars...
Now I want to query Bars that are having active Foo's as such:
Bar.objects.filter(foo.is_active())
I am getting error such as
SyntaxError at /
('non-keyword arg after keyword arg'
How can I achieve this?