|
|
|
@ -1,5 +1,8 @@
|
|
|
|
|
import flask
|
|
|
|
|
import flask_bootstrap
|
|
|
|
|
import redis
|
|
|
|
|
from flask_kvsession import KVSessionExtension
|
|
|
|
|
from simplekv.memory.redisstore import RedisStore
|
|
|
|
|
|
|
|
|
|
from mailu import utils, debug, models, manage, configuration
|
|
|
|
|
|
|
|
|
@ -17,6 +20,7 @@ def create_app_from_config(config):
|
|
|
|
|
# Initialize application extensions
|
|
|
|
|
config.init_app(app)
|
|
|
|
|
models.db.init_app(app)
|
|
|
|
|
KVSessionExtension(RedisStore(redis.StrictRedis().from_url('redis://{0}/3'.format(config['REDIS_ADDRESS']))), app)
|
|
|
|
|
utils.limiter.init_app(app)
|
|
|
|
|
utils.babel.init_app(app)
|
|
|
|
|
utils.login.init_app(app)
|
|
|
|
|