mirror of
https://github.com/simon987/od-database.git
synced 2025-04-19 18:36: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)
|
||||
|
||||
|
||||
@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)
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user