3👍
✅
It seems that my approach is one of the best, so far. Here’s what I’ve ended up with:
pages = [page1, page2] # page1 and page2 are Page objects
Page.objects.filter(site=site).exclude(pk__in=[p.pk for p in pages])
Source:stackexchange.com