Re: for loop appending objects

2009-04-08 Thread thedja
Thanks Malcolm, that is just what i needed. :D ..so simple cheers On Apr 7, 10:55 pm, Malcolm Tredinnick wrote: > On Tue, 2009-04-07 at 14:57 -0700, thedja wrote: > > Good day to you all, > > > Im using > > q = Person.objects.filter(pk=query) > > > and i have this inside a FOR statement. So ever

Re: for loop appending objects

2009-04-07 Thread kalyan
Are stuff in box, things and Person related? If yes you can join them and filter it out Cheers, Kalyan On Apr 7, 5:57 pm, thedja wrote: > Good day to you all, > > Im using > q = Person.objects.filter(pk=query) > > and i have this inside a FOR statement. So every time the loop starts > again q

Re: for loop appending objects

2009-04-07 Thread Malcolm Tredinnick
On Tue, 2009-04-07 at 14:57 -0700, thedja wrote: > Good day to you all, > > Im using > q = Person.objects.filter(pk=query) > > and i have this inside a FOR statement. So every time the loop starts > again q gets rewritten instead of adding the new objects. > > for stuff in box: > for th

for loop appending objects

2009-04-07 Thread thedja
Good day to you all, Im using q = Person.objects.filter(pk=query) and i have this inside a FOR statement. So every time the loop starts again q gets rewritten instead of adding the new objects. for stuff in box: for thing in things: if stuff==thing: