Consider three django models: AA, BB and CC.
AA has an M2M reference to BB and BB has an M2M reference to CC.
I have a single instance of AA. How do I execute a filter() QuerySet over the set of CC instances that are M2M related the the BB instances that are M2M related to that single AA instance?
The following worked for me:
That produces a QuerySet you can further manipulate…
Found the answer in the django documentation here.