Changeset - 873cff4229e3
[Not reviewed]
0 1 0
Joar Wandborg - 11 years ago 2013-12-17 10:18:35
joar@wandborg.se
[web] Late init of storage engine.
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
accounting/web.py
Show inline comments
...
 
@@ -12,4 +12,5 @@ from flask.ext.script import Manager
 
from flask.ext.migrate import Migrate, MigrateCommand
 

	
 
from accounting.storage import Storage
 
from accounting.storage.ledgercli import Ledger
 
from accounting.storage.sql import SQLStorage
...
 
@@ -22,5 +23,5 @@ app = Flask('accounting')
 
app.config.from_pyfile('config.py')
 

	
 
storage = Ledger(app=app)
 
storage = Storage()
 

	
 
if isinstance(storage, SQLStorage):
...
 
@@ -153,4 +154,7 @@ def main(argv=None):
 
                              ' CRITICAL, ERROR, WARNING, INFO, DEBUG'))
 

	
 
    global storage
 
    storage = Ledger(app=app)
 

	
 
    args = parser.parse_args(argv)
 

	
0 comments (0 inline, 0 general)