remove babel and pagedown

This commit is contained in:
Daniel afx 2022-02-04 21:54:14 +02:00
parent 14321e6ce6
commit acf3a42fb2

View file

@ -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()