Remove Downloads page

This commit is contained in:
terorie 2018-12-08 09:57:21 +01:00
parent 1730501c67
commit c3702edf57
No known key found for this signature in database
GPG Key ID: C268B2BBDA2ABECB
3 changed files with 0 additions and 53 deletions

12
app.py
View File

@ -79,18 +79,6 @@ def from_timestamp(value):
return datetime.datetime.fromtimestamp(value)
@app.route("/dl")
@cache.cached(120)
def downloads():
try:
export_file_stats = os.stat("static/out.csv.lzm4")
except FileNotFoundError:
logger.warning("No export file to display in /dl")
export_file_stats = None
return render_template("downloads.html", export_file_stats=export_file_stats)
@app.route("/stats")
@cache.cached(120)
def stats_page():

View File

@ -1,38 +0,0 @@
{% extends "layout.html" %}
{% set title = "Downloads - OD-Database" %}
{% set current_page = "dl" %}
{% block body %}
<div class="container">
<div class="card">
<div class="card-header">Downloads</div>
<div class="card-body">
<p>Please let me know if you used the database in a project!</p>
<p>The entire database is exported to CSV regularly</p>
<table class="table table-striped">
<thead>
<tr>
<th>Description</th>
<th>Size</th>
<th>Date</th>
</tr>
</thead>
<tbody>
{% if export_file_stats %}
<tr>
<td><a href="static/out.csv.xz">out.csv.xz</a></td>
<td>{{ export_file_stats.st_size |filesizeformat }}</td>
<td>{{ export_file_stats.st_mtime|datetime_format }} UTC</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock body %}

View File

@ -28,9 +28,6 @@
<li class="nav-item">
<a class="nav-link {{ "active" if current_page == "contribute" else "" }}" href="/contribute">Contribute</a>
</li>
<li class="nav-item">
<a class="nav-link {{ "active" if current_page == "dl" else "" }}" href="/dl">Downloads</a>
</li>
<li class="nav-item">
<a class="nav-link {{ "active" if current_page == "stats" else "" }}" href="/stats">Stats</a>
</li>