- 看看Q是怎么说明的,如果条件查询条件筛选为一个范围,则有and,or,默认为and
"""
Encapsulates filters as objects that can then be combined logically (using
`&` and `|`).
"""
# Connection types
AND = 'AND'
OR = 'OR'
default = AND
- 如果要查询两个条件为ture,则
Q(info_id=id), Q(mock_re=mock_re)
- 错误方法
Q(info_id=id) and Q(mock_re=mock_re)