mirror of
https://github.com/simon987/od-database.git
synced 2025-04-19 10:26:44 +00:00
Static export file now managed by nginx
This commit is contained in:
parent
1ff1e039f5
commit
53db765856
7
app.py
7
app.py
@ -74,13 +74,6 @@ def stats_json():
|
|||||||
return abort(500)
|
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>/")
|
@app.route("/website/<int:website_id>/")
|
||||||
def website_info(website_id):
|
def website_info(website_id):
|
||||||
website = db.get_website_by_id(website_id)
|
website = db.get_website_by_id(website_id)
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% if export_file_stats %}
|
{% if export_file_stats %}
|
||||||
<tr>
|
<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_size |filesizeformat }}</td>
|
||||||
<td>{{ export_file_stats.st_mtime|datetime_format }} UTC</td>
|
<td>{{ export_file_stats.st_mtime|datetime_format }} UTC</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user