aboutsummaryrefslogtreecommitdiff
path: root/runserver.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-14 22:04:11 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-14 22:04:11 +0100
commitcdb3f6179869dc3555ce34db27c90e9fd62970d7 (patch)
treefdd347bbc75bf2ef56a393cd3a1311d3584f7b0c /runserver.py
parenthide the feed column when a specific feed is selected (diff)
downloadnewspipe-cdb3f6179869dc3555ce34db27c90e9fd62970d7.tar.gz
newspipe-cdb3f6179869dc3555ce34db27c90e9fd62970d7.tar.bz2
newspipe-cdb3f6179869dc3555ce34db27c90e9fd62970d7.zip
compile translations
Diffstat (limited to 'runserver.py')
-rwxr-xr-xrunserver.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/runserver.py b/runserver.py
index 603038dc..3db99db1 100755
--- a/runserver.py
+++ b/runserver.py
@@ -35,8 +35,13 @@ def month_name(month_number):
return calendar.month_name[month_number]
+def datetimeformat(value, format="%Y-%m-%d %H:%M"):
+ return value.strftime(format)
+
+
application.jinja_env.filters["month_name"] = month_name
application.jinja_env.filters["datetime"] = format_datetime
+application.jinja_env.filters["datetimeformat"] = datetimeformat
# inject application in Jinja env
application.jinja_env.globals["application"] = application
bgstack15