1👍
✅
If you use Django’s ORM you can do this fairly simple:
People.objects.filter(c__c__name='Cuba')
This will make two joins – first by city
table and the second by country
.
Look at Django docs.
Source:stackexchange.com