{% extends "base.html" %}
{% block page_title %}Publishers{% endblock %}

{% block title %}All publishers{% endblock %}

{% block content %}
    <table class="table table-bordered table">
    <thead>
        <tr>
        <th scope="col">#</th>
        <th scope="col">Name</th>
        <th scope="col">Games</th>
        <th scope="col">Rating</th>
        </tr>
    </thead>
    <tbody>
        {% for  publisher in object_list %}
        <tr>
        <th scope="row"><a href="{{publisher.get_absolute_url}}">{{publisher.id}}</a></th>
        <td>{{publisher.name}}</td>
        <td>{{publisher.game_set.count}}</td>
        <td>{{publisher.rating_avg}}/100</td>
        </tr>
        {% endfor %}
    </tbody>
    </table>
{% endblock %}
