Is there a way to transform a QuerySet to a Q object in django?
My specific motivation: I would like to subtract one QuerySet (qs_A) from another QuerySet (qs_B). The only way I can think of is by using exclude() and a Q object equivalent of qs_A.
Example:
def my_function(qs_A, qs_B):
# Here I need to transform qs_A to a Q object q_obj_A
qs_new = qs.exclude(q_obj_A)
return qs_new