I have to querysets. alllists and subscriptionlists
alllists = List.objects.filter(datamode = \'A\') subscriptionlists = Membership.objects.filter(member__id
Since Django 1.11, QuerySets have a difference() method amongst other new methods:
# Capture elements that are in qs_all but not in qs_part qs_diff = qs_all.difference(qs_part)
Also see: https://stackoverflow.com/a/45651267/5497962