Re: Queryset composition query

2010-07-07 Thread Tom Evans
On Wed, Jul 7, 2010 at 5:06 PM, Jeff Green wrote: > When I combine two query sets I use the chain command. You might want to try > it. > > Here is my code snippet > > from itertools import chain chain is useful when you want to concatenate two lists together. In this case though, I want distinct

Re: Queryset composition query

2010-07-07 Thread Jeff Green
When I combine two query sets I use the chain command. You might want to try it. Here is my code snippet from itertools import chain # Get current station configuration records stationlist = StationConfig.objects.filter(StationId=result.StationId, StartDate__lte= result.Ex

Queryset composition query

2010-07-07 Thread Tom Evans
Hi all I'm trying to combine two querysets, and having a difficult time explaining why one bit of code works, and why similar code doesn't. I'm probably doing something wrong.. This is a customer management system: User objects are arranged into UserGroup objects, with a through table called User