📜  如何使用 django ornm __in - Python 代码示例

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

代码示例1
# Get blogs entries with id 1, 4 and 7
>>> Blog.objects.filter(pk__in=[1,4,7])

# Get all blog entries with id > 14
>>> Blog.objects.filter(pk__gt=14)