Opened 17 years ago

Closed 14 years ago

#6827 closed (wontfix)

[Feature] Allow contains to work with lists

Reported by: David Cramer Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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 by David Cramer, 17 years ago

Summary: [Featured] Allow contains to work with lists[Feature] Allow contains to work with lists

comment:2 by anonymous, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:3 by Simon Greenhill, 17 years ago

Uh, that was me. Need to work out this login thing.

comment:4 by Yeago, 14 years ago

Resolution: wontfix
Status: newclosed

Closing this. There are a lot of other ways to achieve this and to me there's no reason why AND should be the default above OR.

PS: I have david's blessing

Note: See TracTickets for help on using tickets.
Back to Top