[Fixed]-Learning multi tables joining info django

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 %}
👤nik_m

Leave a comment