On Mon, Jun 30, 2008 at 12:27 PM, Ayaz Ahmed Khan <[EMAIL PROTECTED]> wrote:
> > On Jun 30, 9:08 pm, mike171562 <[EMAIL PROTECTED]> wrote: > > Thanks that works well, but when I try to use the ~ as you suggested I > > get the error > > ""bad operand type for unary ~: 'Q'"" > > so i removed the ~ and changed 'filter' to 'exclude' > > > > That is weird. The negation operator works fine here with the Q > syntax: > > In [15]: Bringer.objects.filter(~Q(buyer__user__id=2) & > ~Q(buyer__user__id=3)) > Out[15]: [] > Negation of Q objects is a recent addition (see http://code.djangoproject.com/ticket/4858). You must be using a post-queryset-refactor SVN checkout while the original poster is probably using a 0.96 release (or an SVN checkout more than a few months old). Karen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---