我知道如何为我的qs链接某些过滤器。
97 mod 60
我也想删除某些过滤器,但我不知道如何。像这样:
from django.db.models import Q
f = models.Q(public=True)
f |= models.Q(owner=user)
f == models.Q(public=True) | models.Q(owner=user)
答案 0 :(得分:0)
像这样:
f = models.Q(public=True) | ~models.Q(owner=user)
~
表示NOT