diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-14 22:54:36 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-14 22:54:36 +0100 |
commit | 563f0b839c7d74be569231e83bf2a894bb24cfe4 (patch) | |
tree | 10f11184e8b92ad2ac99f2dd45b1e5bd748e502d /runserver.py | |
parent | compile translations (diff) | |
download | newspipe-563f0b839c7d74be569231e83bf2a894bb24cfe4.tar.gz newspipe-563f0b839c7d74be569231e83bf2a894bb24cfe4.tar.bz2 newspipe-563f0b839c7d74be569231e83bf2a894bb24cfe4.zip |
Updated translations.
Diffstat (limited to 'runserver.py')
-rwxr-xr-x | runserver.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/runserver.py b/runserver.py index 3db99db1..c190bf5e 100755 --- a/runserver.py +++ b/runserver.py @@ -21,34 +21,13 @@ import calendar from flask import g -from flask_babel import Babel, format_datetime -# Views from flask_restful import Api from newspipe.bootstrap import application -babel = Babel(application) - - -# Jinja filters -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 - with application.app_context(): g.api = Api(application, prefix="/api/v2.0") - g.babel = babel from newspipe.web import views |