From c3702edf57631bbd3f10f90bea216d99492ce514 Mon Sep 17 00:00:00 2001 From: terorie Date: Sat, 8 Dec 2018 09:57:21 +0100 Subject: [PATCH] Remove Downloads page --- app.py | 12 ------------ templates/downloads.html | 38 -------------------------------------- templates/layout.html | 3 --- 3 files changed, 53 deletions(-) delete mode 100644 templates/downloads.html diff --git a/app.py b/app.py index 8eee6b5..32b50ff 100644 --- a/app.py +++ b/app.py @@ -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(): diff --git a/templates/downloads.html b/templates/downloads.html deleted file mode 100644 index f883014..0000000 --- a/templates/downloads.html +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "layout.html" %} -{% set title = "Downloads - OD-Database" %} -{% set current_page = "dl" %} - -{% block body %} -
-
-
Downloads
-
- -

Please let me know if you used the database in a project!

-

The entire database is exported to CSV regularly

- - - - - - - - - - - - - {% if export_file_stats %} - - - - - - {% endif %} - - -
DescriptionSizeDate
out.csv.xz{{ export_file_stats.st_size |filesizeformat }}{{ export_file_stats.st_mtime|datetime_format }} UTC
-
-
-
-{% endblock body %} diff --git a/templates/layout.html b/templates/layout.html index c000894..45e35ea 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -28,9 +28,6 @@ -