1👍
✅
Each post p
in the posts
queryset will have access to its related Vote
objects through p.vote_set.all()
– you can access that in the template as well as in the view.
Source:stackexchange.com