📜  具有多个包含关键字的 django 查询集 - Python 代码示例

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

代码示例1
final_pred = Q()
   for pred in [Q(name__icontains=keyword) for keyword in keywords.split(' ')]:
     final_pred = final_pred | pred;
   Table.objects.filter(final_pre)