Hi,
I have a model called Product with a custom property:
def _get_active(self):
o = get_option()
if self.date_expiration == None:
return True
if self.date_expiration <= o.working_month:
return False
return True
active = property(_get_active)
... and in one of my methods, I have this line:
products = g.product_set.filter(active__exact=True)
But despite the fact that (I think) I've correctly set up the property, the above line gives me "Cannot resolve keyword 'active' into field." What am I missing here?
Thanks in advance.