Re: union of two QuerySets

2012-08-06 Thread Robin Pedersen
models.Q(first_**name__startswith='joh')) > (only one query...) > > > 2012/8/1 Robin Pedersen <robinpe...@gmail.com> > >> On Monday, December 11, 2006 4:37:25 AM UTC+1, Rares Vernica wrote: >>> >>> Hi, >>> >>> What is

Re: union of two QuerySets

2012-08-01 Thread Robin Pedersen
On Monday, December 11, 2006 4:37:25 AM UTC+1, Rares Vernica wrote: > > Hi, > > What is a way to get the union of two QuerySets? > > Something like: > > In [6]: a = Person.objects.filter(first_name__startswith='mic') > > In [7]: b = Person.objects.filter(first_name__startswith='joh') > > In [8]: a