Consider two QuerySet objects of the same class. Is there a simple way to unify them into a single QuerySet by calculating the union? Also, is there a simple way to subtract the
Going back to django's documentation, you can:
new_query_set = query_set_1 | query_set_2
This works as a logical OR which is actually addition without duplicates. This answers the addition aspect and AFAIK does not hit the db at all!
new_query_set = query_set_1 & query_set_2
This works as a logical AND.
Still missing how to subtract QuerySets. It's hard for me to believe this has not been dealt with elegantly by the community...