From acf3a42fb2046755d9a5fd2eebc239c34ccec2fb Mon Sep 17 00:00:00 2001 From: Daniel afx Date: Fri, 4 Feb 2022 21:54:14 +0200 Subject: [PATCH] remove babel and pagedown --- flask/forest/__init__.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/flask/forest/__init__.py b/flask/forest/__init__.py index e313d83..5b1077f 100644 --- a/flask/forest/__init__.py +++ b/flask/forest/__init__.py @@ -17,9 +17,7 @@ from flask.json import JSONEncoder from flask_bootstrap import Bootstrap from flask_mail import Mail from flask_login import LoginManager -from flask_pagedown import PageDown from flask_wtf.csrf import CSRFProtect, CSRFError -from flask_babel import Babel, lazy_gettext from flask_moment import Moment #from flask_httpauth import import import HTTPBasicAuth from werkzeug.contrib.fixers import ProxyFix @@ -54,9 +52,6 @@ pagedown = PageDown(app) csrf = CSRFProtect(app) #csrf.init_app(app) -babel = Babel() -babel.init_app(app) - moment = Moment(app) moment.init_app(app) @@ -129,10 +124,6 @@ def service_unavailable(e): def handle_csrf_error(e): return render_template('errors/csrf_error.html', reason=e.description), 400 -@babel.localeselector -def get_locale(): - return request.accept_languages.best_match(app.config['SUPPORTED_LOCALES']) - #@app.before_request #def before_request(): # g.request_start_time = time.time()