I am trying to filter by users who are not staff, but this user column accepts NULL values in my model.
As a result I need to check for user__isnull, since user__is_staff=False will not work for null values. I tried: Post.objects.filter(Q(user__isnull=True) | Q(user__is_staff=False)) but this returned nothing, while a plain old: Post.objects.filter(user__isnull=True) returns a query set with Post objects. I tried rewriting this as a NAND: Post.objects.exclude(user__isnull=False).exclude(user__is_staff=True) but this didn't work either. Is this a bug? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---