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?