On Tue, 2011-12-06 at 13:04 +0000, Tom Evans wrote:
> > say I have a model method like get_age(self), can I filter on this?
> >
> > Mymodel.objects.filter(get_age() = 5) (this does not work, but any
> ideas
> > would be appreciated)
> 
> You can't do this. Querysets are interfaces to the database, so all
> filtering must be on attributes present or computable in the database.
> Presumably age is calculated from something in the database? 

thanks for confirming this - it is a much needed feature if at all
possible.
-- 
regards
Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to