Beispiel #1
0
 def setup_sqlalchemy(self):
     """
     Creates an engine and a session for SQLAlchemy, using the database URI
     in the configuration.
     """
     db_uri = self.app.config["SQLALCHEMY_DATABASE_URI"]
     e, s = _get_engine_session(db_uri,
                                verbose=self.app.config["SQLALCHEMY_ECHO"])
     self.engine, self.session = e, s
Beispiel #2
0
 def setup_sqlalchemy(self):
     """
     Creates an engine and a session for SQLAlchemy, using the database URI
     in the configuration.
     """
     db_uri = self.app.config["DB_URI"]
     e, s = _get_engine_session(db_uri,
                                verbose=self.app.config["SQLALCHEMY_ECHO"])
     self.engine, self.session = e, s