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]: [] -- Ayaz Ahmed Khan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---