Basic statistics.

This commit is contained in:
Jim Driessen
2017-05-02 15:25:15 +02:00
parent cbc70be451
commit 0b926a4356
12 changed files with 84 additions and 1 deletions

View File

@ -0,0 +1,46 @@
{% extends 'base.html' %}
{% load static %}
{% block title %}Stats{% endblock %}
{% block content %}
<h1>Statistics</h1>
<h2>Uploads</h2>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>User</th>
<th># Songs</th>
</tr>
</thead>
<tbody>
{% for stat in upload_stats %}
<tr>
<td>{{ stat.user__name }}</td>
<td>{{ stat.total }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
<h2>Requests</h2>
<div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>User</th>
<th># Requests</th>
</tr>
</thead>
<tbody>
{% for stat in request_stats %}
<tr>
<td>{{ stat.user__name }}</td>
<td>{{ stat.total }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}