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

{% block title %}All genres{% 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  genre in object_list %}
        <tr>
        <th scope="row"><a href="{{genre.get_absolute_url}}">{{genre.id}}</a></th>
        <td>{{genre.name}}</td>
        <td>{{genre.game_set.count}}</td>
        <td>{{genre.rating_avg}}/100</td>
        </tr>
        {% endfor %}
    </tbody>
    </table>
{% endblock %}
