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 do similar?

(note: things like `set(a) - set(b)` is not acceptable because it produces a python set, not a django queryset)

--
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 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to