From 3152d141e99abd9b769cdf3944d9c3a5f767ae4e Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sat, 2 Jan 2016 10:14:12 +0100 Subject: [PATCH] Add commit on teardown. --- accountant/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/accountant/__init__.py b/accountant/__init__.py index e403ecd..d22df55 100644 --- a/accountant/__init__.py +++ b/accountant/__init__.py @@ -25,6 +25,7 @@ app = Flask(__name__, static_folder=None) app.config.from_pyfile('config.cfg') app.config['SQLALCHEMY_ECHO'] = app.debug +app.config['SQLALCHEMY_COMMIT_ON_TEARDOWN'] = True db = SQLAlchemy(app)