I sometimes have the need to make sure some instances are excluded from a queryset. This is the way I do it usually:
unwanted_instance = MyModel.object
The Given answer is perfect and try this which works fine for me
step 1)
from django.db.models import Q
step 2)
MyModel.objects.filter(~Q(id__in=[o.id for o in ]))