Commit 18d16f9a authored by blitzmann's avatar blitzmann

Initial attempt at setting up CalibreDB as a class that carries the engine and...

Initial attempt at setting up CalibreDB as a class that carries the engine and DB connection, and the instance being the session
parent 7929711f
......@@ -83,6 +83,8 @@ log = logger.create()
from . import services
db.CalibreDB.setup_db(config, cli.settingspath)
calibre_db = db.CalibreDB()
def create_app():
......@@ -91,7 +93,7 @@ def create_app():
if sys.version_info < (3, 0):
app.static_folder = app.static_folder.decode('utf-8')
app.root_path = app.root_path.decode('utf-8')
app.instance_path = app.instance_path .decode('utf-8')
app.instance_path = app.instance_path.decode('utf-8')
cache_buster.init_cache_busting(app)
......@@ -101,7 +103,6 @@ def create_app():
app.secret_key = os.getenv('SECRET_KEY', config_sql.get_flask_session_key(ub.session))
web_server.init_app(app, config)
calibre_db.setup_db(config, cli.settingspath)
babel.init_app(app)
_BABEL_TRANSLATIONS.update(str(item) for item in babel.list_translations())
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment