在转换这行 sql 时,我对将 sql 查询转换为 django ORM 函数调用感到困惑
AND (presentations.teaching_guide_text LIKE %s OR presentations.name LIKE %s OR presentations.synopsis LIKE %s OR presentations.tags LIKE %s) AND
我试过这样做,
Presentations.objects.\
filter(deleted=0).\
filter(published=1).\
filter(academic_only=0).\
filter(video_type=1).\
filter(synopsis__icontains=search_item_array[i]).\
filter(tags__icontains=search_item_array[i]).\
filter(teaching_guide_text__icontains=search_item_array[i]).\
filter(name__icontains=search_item_array[i]).all()
但它不能正常工作。谁能建议我解决这个问题的解决方案