|
|
@ -3,6 +3,7 @@ import flask_bootstrap
|
|
|
|
|
|
|
|
|
|
|
|
from mailu import utils, debug, models, manage, configuration
|
|
|
|
from mailu import utils, debug, models, manage, configuration
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import hmac
|
|
|
|
|
|
|
|
|
|
|
|
def create_app_from_config(config):
|
|
|
|
def create_app_from_config(config):
|
|
|
|
""" Create a new application based on the given configuration
|
|
|
|
""" Create a new application based on the given configuration
|
|
|
@ -24,6 +25,8 @@ def create_app_from_config(config):
|
|
|
|
utils.proxy.init_app(app)
|
|
|
|
utils.proxy.init_app(app)
|
|
|
|
utils.migrate.init_app(app, models.db)
|
|
|
|
utils.migrate.init_app(app, models.db)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app.temp_token_key = hmac.new(bytearray(app.secret_key, 'utf-8'), bytearray('WEBMAIL_TEMP_TOKEN_KEY', 'utf-8'), 'sha256').digest()
|
|
|
|
|
|
|
|
|
|
|
|
# Initialize debugging tools
|
|
|
|
# Initialize debugging tools
|
|
|
|
if app.config.get("DEBUG"):
|
|
|
|
if app.config.get("DEBUG"):
|
|
|
|
debug.toolbar.init_app(app)
|
|
|
|
debug.toolbar.init_app(app)
|
|
|
|