📜  django 过滤器不等于 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:42.492000             🧑  作者: Mango

代码示例1
from myapp.models import Entry
from django.db.models import Q
# Returns all entries except those with 3 as their id
Entry.objects.filter(~Q(id=3))