1👍
✅
Work with:
Classroom.objects.filter(
student__user=request.user
)
This will retrieve all Classroom
s for which a related Student
has as user
the request.user
.
Source:stackexchange.com