我想弄清楚如何在django中编写一个'not in'样式查询.例如,我想的查询结构看起来像这样.
select table1.*
from table1
where table1.id not in
(
select table2.key_to_table1
from table2
where table2.id = some_parm
)
Run Code Online (Sandbox Code Playgroud)
假设模型名为table1和table2,django语法会是什么样子?