Re: Get results from query depending on another query

2009-08-18 Thread Jonas Obrist
course = Course.objects.filter(group__user=request.user) Chris McComas wrote: > I have a model that has a FK to django.contrib.auth.models Group. I > run a query that gets all the groups that a user is a member of: > > groups = Group.objects.filter(user=request.user) > > Then I want to run a

Re: Get results from query depending on another query

2009-08-18 Thread Daniel Roseman
On Aug 18, 8:28 pm, Chris McComas wrote: > I have a model that has a FK to django.contrib.auth.models Group. I > run a query that gets all the groups that a user is a member of: > > groups = Group.objects.filter(user=request.user) > > Then I want to run a query for that

Get results from query depending on another query

2009-08-18 Thread Chris McComas
I have a model that has a FK to django.contrib.auth.models Group. I run a query that gets all the groups that a user is a member of: groups = Group.objects.filter(user=request.user) Then I want to run a query for that model that gets and entries in that model where the group FK is one of the