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