📜  循环内部 fiter() - BASIC 代码示例

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

代码示例1
from operator import and_
from django.db.models import Q

categories = ['holiday', 'summer']
res = Photo.filter(reduce(and_, [Q(tags__name=c) for c in categories]))