I have these models:
def Foo(Models.model):
size = models.IntegerField()
# other fields
def is_active(self):
if check_condition:
class Page(models.Model):
category = models.ForeignKey(Category)
title = models.CharField(max_length=128)
url = models.URLField()
...
class Category(models.Model):
...
open = models.BooleanField(default=True)
May be you can use simple filter, for this type of conditions.
Page.objects.filter(category__open=True)