diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-14 22:04:11 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-14 22:04:11 +0100 |
commit | cdb3f6179869dc3555ce34db27c90e9fd62970d7 (patch) | |
tree | fdd347bbc75bf2ef56a393cd3a1311d3584f7b0c /runserver.py | |
parent | hide the feed column when a specific feed is selected (diff) | |
download | newspipe-cdb3f6179869dc3555ce34db27c90e9fd62970d7.tar.gz newspipe-cdb3f6179869dc3555ce34db27c90e9fd62970d7.tar.bz2 newspipe-cdb3f6179869dc3555ce34db27c90e9fd62970d7.zip |
compile translations
Diffstat (limited to 'runserver.py')
-rwxr-xr-x | runserver.py | 5 |
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 |