Consider three django models: AA, BB, and CC. AA has an M2M link to BB and BB has an M2M link to CC.
I have one copy of AA. How to execute QuerySet filter () on a set of CC instances that are M2M associated with BB instances that are M2M associated with this single AA instance?
The following worked for me:
CC.objects.filter( bb__aa = aa_instance )
This creates a QuerySet that you can manipulate ...
Found the answer in django documentation here .
Source: https://habr.com/ru/post/1748429/More articles:Memcache - Как продлить срок действия с сохранением согласованности стоимости? - phpembed YouTube videos dynamically with jquery - jqueryHow to backup and restore yum? - centosAlternative to .Net for manually creating / TR / TD tables? - .netChoosing a value from multiple dictionaries inside an enumeration - c #Confirm the existence of the executable (script, bat, cmd, exe) through the ruby file - ruby | fooobar.comGeneral test data for several independent maven projects - unit-testingIs there an open Flash + PHP multiplayer board? - phphttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1748433/from-string-of-bytes-to-opencvs-iplimage-in-python&usg=ALkJrhjDIokzTXI7yHHY4dqWIt4gmqivgQпомощь с картой java хэш - javaAll Articles