aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-12-24 00:11:15 +0000
committerrubenwardy <rw@rubenwardy.com>2018-12-24 00:11:15 +0000
commitfa0506f58a592051eaed23bfde69ccee663083f6 (patch)
tree3bd0bfdaa3435ad6a05fe3edbe97ac5ee699398a /app/views
parent50889ccca57cea9166ab7c64a83d540d6c0a20ce (diff)
downloadcheatdb-fa0506f58a592051eaed23bfde69ccee663083f6.tar.xz
Add create date to topic list
Diffstat (limited to 'app/views')
-rw-r--r--app/views/__init__.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py
index 4f45909..7ca7620 100644
--- a/app/views/__init__.py
+++ b/app/views/__init__.py
@@ -33,6 +33,10 @@ def domain(url):
return urlparse(url).netloc
@app.template_filter()
+def date(value):
+ return value.strftime("%Y-%m-%d")
+
+@app.template_filter()
def datetime(value):
return value.strftime("%Y-%m-%d %H:%M") + " UTC"