diff options
| author | rubenwardy <rw@rubenwardy.com> | 2018-05-27 23:45:12 +0100 |
|---|---|---|
| committer | rubenwardy <rw@rubenwardy.com> | 2018-05-27 23:45:12 +0100 |
| commit | 48573fe922e34e65a5f53b342954241bd92486ca (patch) | |
| tree | 5c0508851c5556ef84ee6ded4dcc18ce555c396d /app/views | |
| parent | dff967d3df7d71a936c48591e512c5afb4ef9138 (diff) | |
| download | cheatdb-48573fe922e34e65a5f53b342954241bd92486ca.tar.xz | |
Use proper datetime formatting
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py index 2559969..c28ff56 100644 --- a/app/views/__init__.py +++ b/app/views/__init__.py @@ -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) |
