[Feature] Allow contains to work with lists
|Reported by:||David Cramer||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Cc:||Triage Stage:||Design decision needed|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
A useful feature we had added in Curse's Django was a QUERY_TERM for "containswords". The more thought that I put into it, it would make more sense just to have contains allow for lists.
What this would do:
MyModel.objects.filter(name__contains=('hello', 'there')) SELECT 1 FROM tbl WHERE (name LIKE '%hello%' AND name LIKE '%there%')
It was a pretty quick and useful feature to help with search.
Change History (4)
comment:1 Changed 9 years ago by
|Summary:||[Featured] Allow contains to work with lists → [Feature] Allow contains to work with lists|