I have following models setup in my Django application
class School(models.Model):
name = models.TextField()
class Courses(models.Model):
name = models.TextField()
schools = ManyToManyField(School)
Now, I want to find out all schools which offer a particular course. For example, find all schools which offer biology and chemistry. What query can I use?
thanks
See lookup that span relationships in the manual: