Exports are downloadable

This commit is contained in:
Simon
2018-06-06 11:12:24 -04:00
parent 0b1d76f478
commit 7ac7972fd6
8 changed files with 71 additions and 10 deletions

37
templates/downloads.html Normal file
View File

@@ -0,0 +1,37 @@
{% 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>The entire database is exported to CSV every ±30min</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>out.csv.xz</td>
<td>{{ export_file_stats.st_size }}</td>
<td>{{ export_file_stats.st_mtime|datetime_format }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>
</div>
{% endblock body %}

View File

@@ -1,5 +1,5 @@
{% extends "layout.html" %}
{% set current_page = "home" %}
{% set title = "OD-Database - Home" %}
{% block body %}

View File

@@ -37,6 +37,9 @@
<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>
</ul>
</div>
</nav>

View File

@@ -1,4 +1,5 @@
{% extends "layout.html" %}
{% set current_page = "search" %}
{% set title = "OD-Database - Search" %}

View File

@@ -1,5 +1,6 @@
{% extends "layout.html" %}
{% set title = "OD-Database - Submit website" %}
{% set current_page = "submit" %}
{% block body %}
<div class="container" >
@@ -12,7 +13,7 @@
</div>
<div class="row">
<div class="col">
{# {{ recaptcha.get_code()|safe }}#}
{{ recaptcha.get_code()|safe }}
</div>
<div class="col">
<input class="btn btn-primary" type="submit" value="Submit" title="Submit open directory">
@@ -23,8 +24,8 @@
<hr>
<p class="text-muted">
Note: TODO note
<p class="text-muted">By submitting this form you agree that your IP address and User Agent will be
saved (for debugging purposes only).
</p>
</div>
</div>

View File

@@ -1,5 +1,6 @@
{% extends "layout.html" %}
{% set title = "OD-Datase - Websites" %}
{% set current_page = "website" %}
{% block body %}
<div class="container">