Re: Heavy database query (max 32 tables problem)

2008-07-19 Thread Deniz Dogan
Indeed I am. So if Leon Yeh could give me my thread back, I'd appreciate if anyone could inform me about a good solution to my problem. Deniz On 18 Juli, 17:58, "Scott Moonen" <[EMAIL PROTECTED]> wrote: > Norman, unfortunately I think he's asking for the mutual intersection of the > users' cours

Re: Heavy database query (max 32 tables problem)

2008-07-18 Thread Scott Moonen
Norman, unfortunately I think he's asking for the mutual intersection of the users' courses, not the union. -- Scott On Fri, Jul 18, 2008 at 11:49 AM, Norman Harman <[EMAIL PROTECTED]> wrote: > > Deniz Dogan wrote: > > Hey. > > > > I have a model Course and then I have django.contrib.auth.mode

Re: Heavy database query (max 32 tables problem)

2008-07-18 Thread Norman Harman
Deniz Dogan wrote: > Hey. > > I have a model Course and then I have django.contrib.auth.models.User. > Users and courses are related through M2M, so a user can register for > many courses and a course can register multiple users. Now, given a > potentially very long list of users, I want to retri

Re: Heavy database query (max 32 tables problem)

2008-07-18 Thread [EMAIL PROTECTED]
Theres no need for that list comprehension, you can just do Course.objects.filter(users__in=users) On Jul 18, 10:49 am, "Norman Harman" <[EMAIL PROTECTED]> wrote: > Deniz Dogan wrote: > > Hey. > > > I have a model Course and then I have django.contrib.auth.models.User. > > Users and courses are

Heavy database query (max 32 tables problem)

2008-07-18 Thread Deniz Dogan
Hey. I have a model Course and then I have django.contrib.auth.models.User. Users and courses are related through M2M, so a user can register for many courses and a course can register multiple users. Now, given a potentially very long list of users, I want to retrieve all the courses for which a