aboutsummaryrefslogtreecommitdiff
path: root/runserver.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-14 22:54:36 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-14 22:54:36 +0100
commit563f0b839c7d74be569231e83bf2a894bb24cfe4 (patch)
tree10f11184e8b92ad2ac99f2dd45b1e5bd748e502d /runserver.py
parentcompile translations (diff)
downloadnewspipe-563f0b839c7d74be569231e83bf2a894bb24cfe4.tar.gz
newspipe-563f0b839c7d74be569231e83bf2a894bb24cfe4.tar.bz2
newspipe-563f0b839c7d74be569231e83bf2a894bb24cfe4.zip
Updated translations.
Diffstat (limited to 'runserver.py')
-rwxr-xr-xrunserver.py21
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
bgstack15