[Django]-How to get Django QuerySet 'exclude' to work right?

1👍

You could do this – get all the objects for checklist 1, and exclude it from the complete list.

sku_ids = skus.values_list('pk', flat=True)
non_checklist_1 = SKU.objects.exclude(pk__in=sku_ids).distinct()

Leave a comment