Opened 19 years ago
Closed 19 years ago
#966 closed enhancement (fixed)
[patch] add 'not'-variants to some lookup kwargs
Reported by: | hugo | Owned by: | Adrian Holovaty |
---|---|---|---|
Component: | Core (Other) | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently there are no 'inotcontains', 'notcontains', 'notstartswith', 'notendswith' queries which makes it awkward if you want to build a query that searches for all stuff that includes 'foo' but doesn't include 'bar' - you need to fetch IDs and filter IDs based on those results yourself.
This could be done in two ways: either just add those query lookup kwargs to the backends (mapping them to the matching NOT LIKE clauses) or enhance the AND/OR combinator syntax by introducing not handling (creating a Qnot object that will render as NOT(condition) in the SQL). The first version is much easier to do and fit's nicely into the current kwarg-based query syntax, so I would opt for that version.
Attachments (1)
Change History (5)
by , 19 years ago
Attachment: | notlike.diff added |
---|
comment:1 by , 19 years ago
Summary: | add 'not'-variants to some lookup kwargs → [patch] add 'not'-variants to some lookup kwargs |
---|
comment:3 by , 19 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
reverted changes in SVN and reopened ticket
comment:4 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
add notcontains and friends