e. Q查询 ``` def search(self, query_list): query = self.request.GET.get('query', '') # 获取query的值 # Q(Q(qq__contains=query) | Q(name__contains=query)) # Q条件---或 q = Q() q.connector = 'OR' # 条件的联合方式, 或与非 # Q(('qq__contains', query)) Q(qq__contains=query) ,单个Q条件的写法,内部元组,等同于后一个 for i in query_list: # 循环需要查询的字段 q.children.append(Q(('{}__contains'.format(i), query))) # children 子条件添加, return q ```