diff --git a/admin/freeposte/__init__.py b/admin/freeposte/__init__.py index facf4d0a..8d44fa65 100644 --- a/admin/freeposte/__init__.py +++ b/admin/freeposte/__init__.py @@ -4,6 +4,7 @@ import flask_bootstrap import flask_login import flask_script import flask_migrate +import flask_babel import os import docker @@ -23,7 +24,9 @@ default_config = { 'DEBUG': False, 'BOOTSTRAP_SERVE_LOCAL': True, 'DKIM_PATH': '/dkim/{domain}.{selector}.key', - 'DKIM_SELECTOR': 'dkim' + 'DKIM_SELECTOR': 'dkim', + 'BABEL_DEFAULT_LOCALE': 'en', + 'BABEL_DEFAULT_TIMEZONE': 'UTC' } # Load configuration from the environment if available @@ -36,6 +39,7 @@ db = flask_sqlalchemy.SQLAlchemy(app) migrate = flask_migrate.Migrate(app, db) login_manager = flask_login.LoginManager() login_manager.init_app(app) +babel = flask_babel.Babel(app) # Manager commnad manager = flask_script.Manager(app) diff --git a/admin/requirements.txt b/admin/requirements.txt index a7076531..1437717c 100644 --- a/admin/requirements.txt +++ b/admin/requirements.txt @@ -2,9 +2,10 @@ Flask Flask-Login Flask-SQLAlchemy Flask-bootstrap +Flask-Babel Flask-migrate Flask-script -flask_wtf +Flask-wtf WTForms-Components PyOpenSSL passlib