Enable Babel

master
Pierre Jaury 8 years ago
parent 676a9a5d2c
commit d3436668d8

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

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

Loading…
Cancel
Save