I'm trying to figure out how to write a 'not in' style query in django.
For example, the query structure I'm thinking of would look like this.
select table1.*
from table1
where table1.id not in
(
select table2.key_to_table1
from table2
where table2.id = some_parm
)
What would the django syntax look like assuming models called table1 and table2?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…