Group by game instead of purchase

This commit is contained in:
2023-11-02 15:08:11 +01:00
parent f13ed8a078
commit 058b83522c
2 changed files with 16 additions and 10 deletions

View File

@ -39,14 +39,14 @@
</tr>
</thead>
<tbody>
{% for purchase in top_10_by_playtime %}
{% for game in top_10_games_by_playtime %}
<tr>
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">
<a href="{% url 'view_game' purchase.edition.game.id %}">{{ purchase.edition.name }}
<a href="{% url 'view_game' game.id %}">{{ game.name }}
</a>
</td>
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">{{ purchase.formatted_playtime }}</td>
<td class="px-2 sm:px-4 md:px-6 md:py-2 font-mono">{{ game.formatted_playtime }}</td>
</tr>
{% endfor %}
</tbody>