I'm wondering if it is somehow possible to use "the inverse" of the __contains
fields lookup.
https://docs.djangoproject.com/en/1.11/ref/models/querysets/#contains
So for example:
class Person(models.Model):
...
last_name = models.CharField()
And with this Person
model I could do for example the following query that'll return the Persons that have a last_name
field that would fit in the string given:
>>> Person.objects.filter(last_name__contains='John Doe, Jane Roe, ...')
<QuerySet: [Person: Donald Doe]>