[Answer]-Get all objects not in M2M table in django

1👍

You could do

ordered_items_not_in_invoice = OrderItem.objects.filter(invoice__isnull=True)

Read more on Lookups spanning multi valued relationships and __isnull

Leave a comment