[Fixed]-Filter objects that exist in the Foreign Key relationship

1👍

Here is how you might filter for Concept objects that pertain to a Course with a particular name:

concepts = Concept.objects.filter(course__name="Your course name")

Or, you could filter for concepts that relate to a queryset of courses:

concepts = Concept.objects.filter(course__name__icontains="mathematics")

Leave a comment