1👍
✅
Try this (this will fetch player
instances):
bostonp = Player.objects.filter(curr_team__team_name__contains='Penguins')
And then in your template:
{% for player in bostonp %}
<li>{{ player.first_name }} {{ player.last_name }}</li>
{% endfor %}
Source:stackexchange.com