Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Call me before using any of the tables or classes in the model.

        def init_model(engine):
    """Call me before using any of the tables or classes in the model."""
    print "init_model(%s)" % engine
    DBSession.configure(bind=engine)
        


src/k/n/knowledge-0.3/tests/test_basic.py   knowledge(Download)
from sqlalchemy import create_engine
 
from knowledge.model import init_model, metadata, DBSession, Entity
 
 
class TestBasics(unittest.TestCase):
    def setUp(self):
        engine = create_engine('sqlite:///:memory:')
        init_model(engine)