added stats page
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
<div class="dropdown-menu" aria-labelledby="BookMenu">
|
||||
<a class="dropdown-item" href="{{url_for('books')}}">Create</a>
|
||||
<a class="dropdown-item" href="{{url_for('books')}}">Show All</a>
|
||||
<a class="dropdown-item" href="{{url_for('stats')}}">Show Stats</a>
|
||||
</div>
|
||||
</div class="nav-item dropdown">
|
||||
<div class="nav-item dropdown">
|
||||
|
||||
15
templates/stats.html
Normal file
15
templates/stats.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block main_content %}
|
||||
<h3>Stats</h3>
|
||||
<table id="stats_table" class="table table-striped table-sm" data-toolbar="#toolbar" data-search="true">
|
||||
<thead>
|
||||
<tr class="thead-light"><th>Statistic</th><th>Value</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for s in stats %}
|
||||
<tr><td>{{s.stat}}</td><td>{{s.value}}</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% endblock main_content %}
|
||||
Reference in New Issue
Block a user