On Wed, 2008-01-02 at 14:25 -0800, Peter wrote:
> 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:
>
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
2 matches
Mail list logo