mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-09 06:27:38 +01:00
Use proper datetime formatting
This commit is contained in:
parent
dff967d3df
commit
48573fe922
@ -67,6 +67,7 @@
|
|||||||
<td>Name</td>
|
<td>Name</td>
|
||||||
<td>{{ package.name }}</td>
|
<td>{{ package.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% if package.provides %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Provides</td>
|
<td>Provides</td>
|
||||||
<td>{% for meta in package.provides %}
|
<td>{% for meta in package.provides %}
|
||||||
@ -76,6 +77,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}</td>
|
{% endfor %}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Author</td>
|
<td>Author</td>
|
||||||
<td class="{{ package.author.rank }}">
|
<td class="{{ package.author.rank }}">
|
||||||
@ -92,6 +94,10 @@
|
|||||||
<td>License</td>
|
<td>License</td>
|
||||||
<td>{{ package.license.name }}</td>
|
<td>{{ package.license.name }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Added</td>
|
||||||
|
<td>{{ package.created_at | datetime }}</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<ul class="buttonset linedbuttonset">
|
<ul class="buttonset linedbuttonset">
|
||||||
@ -130,7 +136,7 @@
|
|||||||
{% if not rel.approved %}<i>{% endif %}
|
{% if not rel.approved %}<i>{% endif %}
|
||||||
|
|
||||||
<a href="{{ rel.url }}">{{ rel.title }}</a>,
|
<a href="{{ rel.url }}">{{ rel.title }}</a>,
|
||||||
created {{ rel.releaseDate }}.
|
created {{ rel.releaseDate | datetime }}.
|
||||||
{% if rel.task_id %}
|
{% if rel.task_id %}
|
||||||
<a href="{{ url_for('check_task', id=rel.task_id, r=package.getDetailsURL()) }}">Importing...</a>
|
<a href="{{ url_for('check_task', id=rel.task_id, r=package.getDetailsURL()) }}">Importing...</a>
|
||||||
{% elif not rel.approved %}
|
{% elif not rel.approved %}
|
||||||
|
@ -35,6 +35,10 @@ def throw(err):
|
|||||||
def domain(url):
|
def domain(url):
|
||||||
return urlparse(url).netloc
|
return urlparse(url).netloc
|
||||||
|
|
||||||
|
@app.template_filter()
|
||||||
|
def datetime(value):
|
||||||
|
return value.strftime("%Y-%m-%d %H:%M") + " UTC"
|
||||||
|
|
||||||
@app.route("/uploads/<path:path>")
|
@app.route("/uploads/<path:path>")
|
||||||
def send_upload(path):
|
def send_upload(path):
|
||||||
return send_from_directory("public/uploads", path)
|
return send_from_directory("public/uploads", path)
|
||||||
|
Loading…
Reference in New Issue
Block a user