Django equivalent of SQL not in

Solution 1:

try using exclude

Table.objects.exclude(title__in=myListOfTitles)

Solution 2:

Table.objects.exclude(title__in=myListOfTitles)

Solution 3:

(this thread is old but still could be googled)

you can use models.Q with "~" as follows:

Table.objects.filter(~Q(title__in=myListOfTitles))

this method specially is helpful when you have multiple conditions.