2👍
✅
See lookup that span relationships in the manual:
class Courses(models.Model):
name = models.TextField()
schools = ManyToManyField(School, related_name='courses_set')
School.objects.filter(courses_set__name__in=('biology', 'chemistry'))
Source:stackexchange.com