On Sat, 2007-03-10 at 14:43 -0800, shelbybark wrote:
> I'm trying to figure out how to combine the results of a few different
> querysets to have a list of upcoming events on a basic calendar page.
> I don't know for sure if this is possible. Any direction would be
> appreciated.

QuerySets act like Python iterators. So you can combine them however you
would normally combine multiple iterators. For example, turn them into
sequences (using list()) and concatenate the lists. Or use
itertools.chain from the standard Python library.

At the moment unions of QuerySets at the database level do not work
reliably. That will be fixed for 1.0, but that is a way off yet.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to