我正在尝试执行与此 SQL 查询等效的操作:
"SELECT * FROM something WHERE ((something >= something AND something <= something) AND(something >= something AND something <= something))"
我无法完全弄清楚。我试过以下没有成功..
.filter(( Q(something__gte=something) & Q(something__lte=something)) & ( Q(something__gte=something) & Q(something__lte=something)))
.filter( Q(something__gte=something,something__lte=something) & Q(something__gte=something,something__lte=something))
两者都返回以下内容..并完全忽略了我的括号...
WHERE (`something`.`something` >= something AND `something`.`something` <= -something AND `something`.`something` >= something AND `something`.`something` <= something )