1👍
There’s no need to query CandidatePhotos in the view at all. Your candidate object already had the relevant relationship, through User, so you can simply follow that:
{% for photo in object.user.candidatephotos_set.all %}
Source:stackexchange.com