This is something I attempted once to do over a small GET wrapper by
adding __not; any __not query would be passed to exclude(). Would that
be a solution to the problem?
J. Leclanche / Adys
On Tue, Oct 20, 2009 at 6:31 PM, Michael P. Jung wrote:
>
> rm>
rm> exclude(x=1).exclude(y=2) translates to NOT (x=1) AND NOT (y=2)
So why do we have __gt, __ge, __lt, __le then? It would be as simple to
have only __le and get rid of the rest as it can easily expressed using
exclude and filter. I know, it's picky, but you get my point.
I don't see why all
On Tue, Oct 20, 2009 at 10:09 PM, Michael P. Jung wrote:
>
> I'd like to propose a new field lookup __neq which could be used to
> negate a single parameter. It is not ment to make exclude() obsolete, as
> they both have a different scope:
>
> filter(x__neq=1, y__neq=2) would
On di, 2009-10-20 at 16:09 +0200, Michael P. Jung wrote:
> Besides exclude(x=None).exclude(y=None).exclude(z=None) feels less
> intuitive to me than filter(x__neq=None, y__neq=None, y__neq=None).
That's what Q objects are for:
.filter(~Q(x=None),~Q(y=None),~Q(z=None))
or: