Static export file now managed by nginx

This commit is contained in:
Simon 2018-09-06 19:38:07 -04:00
parent 1ff1e039f5
commit 53db765856
2 changed files with 1 additions and 8 deletions

7
app.py
View File

@ -74,13 +74,6 @@ def stats_json():
return abort(500)
@app.route("/get_export")
def get_export():
if os.path.exists("static/out.csv.xz"):
return send_from_directory("static", "out.csv.xz", as_attachment=True, mimetype="application/x-xz")
return abort(404)
@app.route("/website/<int:website_id>/")
def website_info(website_id):
website = db.get_website_by_id(website_id)

View File

@ -24,7 +24,7 @@
<tbody>
{% if export_file_stats %}
<tr>
<td><a href="/get_export">out.csv.xz</a></td>
<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>