Re: QuerySet exclusion

2012-02-17 Thread akaariai
On Feb 17, 6:33 pm, Lie Ryan wrote: > If I have two querysets, say 'a' and 'b', the goal is to create another > queryset, say 'c', which has all elements in 'a' that is not in 'b'. > > I can write: > >      c = a.exclude(id__in=b.values('id')) > > but this seems a little tedious, why can't I just

QuerySet exclusion

2012-02-17 Thread Lie Ryan
If I have two querysets, say 'a' and 'b', the goal is to create another queryset, say 'c', which has all elements in 'a' that is not in 'b'. I can write: c = a.exclude(id__in=b.values('id')) but this seems a little tedious, why can't I just write: c = a.exclude(b) is there any way to