Re: Adding support for ~ to Q objects (negation)

2007-07-13 Thread Collin Grady
Added a few tests and docs - not sure how good they are, but better than nothing :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to

Re: Adding support for ~ to Q objects (negation)

2007-07-12 Thread Russell Keith-Magee
On 7/13/07, Nick <[EMAIL PROTECTED]> wrote: > > On Jul 13, 8:36 am, Collin Grady <[EMAIL PROTECTED]> wrote: > > As such, the following patch was born, allowing ~q instead of > > QNot(q) :) > > > > http://code.djangoproject.com/ticket/4858 > > I've had to use the QNot() myself too, and agree

Re: Adding support for ~ to Q objects (negation)

2007-07-12 Thread Nick
On Jul 13, 8:36 am, Collin Grady <[EMAIL PROTECTED]> wrote: > Simon requested I bring this up here - I was working through a problem > with a user on IRC, and he noted that Q objects support the bitwise & > and |, but not ~ - if you wanted to negate a Q object, you had to > explicitly import

Adding support for ~ to Q objects (negation)

2007-07-12 Thread Collin Grady
Simon requested I bring this up here - I was working through a problem with a user on IRC, and he noted that Q objects support the bitwise & and |, but not ~ - if you wanted to negate a Q object, you had to explicitly import QNot and use that instead. As such, the following patch was born,