Re: Select child objects of parents in QuerySet

2010-12-23 Thread Javier Guerra Giraldez
On Fri, Dec 24, 2010 at 12:36 AM, muzhig wrote: > > how to select all entries of blogs in category? Entry.objects.filter(blog__category = category) -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Select child objects of parents in QuerySet

2010-12-23 Thread muzhig
Hi! For example, I have models: Category Blog Entry Way to select all entries of blog is simple: blog.enty_set entry_set is a QuerySet Way to select all blogs in category is same: category.blog_set But it is not obvious to me, how to select all entries of blogs in category? or, in other words,