Closed saschagottfried closed 10 years ago
we added the session to the request and there is no current known use-case that requires to handle transaction with view code. Thus we rely on an automatic commit at the end of a request. This is what we configured with:
DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension())) def get_db_session(request): """return thread-local DB session""" return DBSession config.add_request_method(get_db_session, 'db', reify=True)
we added the session to the request and there is no current known use-case that requires to handle transaction with view code. Thus we rely on an automatic commit at the end of a request. This is what we configured with: