1
0
mirror of https://github.com/Mailu/Mailu.git synced 2024-12-14 10:53:30 +02:00

Enable Babel

This commit is contained in:
Pierre Jaury 2016-10-02 14:23:44 +02:00
parent 676a9a5d2c
commit d3436668d8
2 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import flask_bootstrap
import flask_login import flask_login
import flask_script import flask_script
import flask_migrate import flask_migrate
import flask_babel
import os import os
import docker import docker
@ -23,7 +24,9 @@ default_config = {
'DEBUG': False, 'DEBUG': False,
'BOOTSTRAP_SERVE_LOCAL': True, 'BOOTSTRAP_SERVE_LOCAL': True,
'DKIM_PATH': '/dkim/{domain}.{selector}.key', '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 # Load configuration from the environment if available
@ -36,6 +39,7 @@ db = flask_sqlalchemy.SQLAlchemy(app)
migrate = flask_migrate.Migrate(app, db) migrate = flask_migrate.Migrate(app, db)
login_manager = flask_login.LoginManager() login_manager = flask_login.LoginManager()
login_manager.init_app(app) login_manager.init_app(app)
babel = flask_babel.Babel(app)
# Manager commnad # Manager commnad
manager = flask_script.Manager(app) manager = flask_script.Manager(app)

View File

@ -2,9 +2,10 @@ Flask
Flask-Login Flask-Login
Flask-SQLAlchemy Flask-SQLAlchemy
Flask-bootstrap Flask-bootstrap
Flask-Babel
Flask-migrate Flask-migrate
Flask-script Flask-script
flask_wtf Flask-wtf
WTForms-Components WTForms-Components
PyOpenSSL PyOpenSSL
passlib passlib