[Answered ]-Django accessing foreign key in model

2👍

This should work

parents = Relationship.objects.filter(student__schoolclass__id=class_id).values_list('parent', flat=True)

“To refer to a “reverse” relationship, just use the lowercase name of the model”. (docs)

Leave a comment