2👍
You could do:
items_to_exclude = Inventory.objects.values_list('items', flat=True)
items = Items.objects.exclude(id__in=items_to_exclude)
Source:stackexchange.com
2👍
You could do:
items_to_exclude = Inventory.objects.values_list('items', flat=True)
items = Items.objects.exclude(id__in=items_to_exclude)