def includeme(config):
 settings = config.get_settings()
 config.include('pyramid_tm')
 session_factory = get_session_factory(get_engine(settings))
 config.registry['dbsession_factory'] = session_factory
 config.add_request_method((lambda r: get_tm_session(session_factory, r.tm)), 'dbsession', reify=True)

def includeme ( config ) : settings = config . get_settings ( ) config . include ( 'pyramid_tm' ) session_factory = get_session_factory ( get_engine ( settings ) ) config . registry [ 'dbsession_factory' ] = session_factory config . add_request_method ( ( lambda r : get_tm_session ( session_factory , r . tm ) ) , 'dbsession' , reify = True )
initialize the model for a pyramid app .