Django get objects not referenced by foreign key Something like this: AA.objects.filter(state=10, bb=None)