예제 #1
0
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    engine = engine_from_config(settings, 'sqlalchemy.')
    initialize_sql(engine)
    config = Configurator(settings=settings)
    config.add_static_view('static', 'imhotep:static')
    config.add_route('home', '/', view='imhotep.views.my_view',
                     view_renderer='templates/mytemplate.pt')
    return config.make_wsgi_app()
예제 #2
0
def main(global_config, **settings):
    """ This function returns a Pyramid WSGI application.
    """
    engine = engine_from_config(settings, 'sqlalchemy.')
    initialize_sql(engine)
    config = Configurator(settings=settings)
    config.add_static_view('static', 'imhotep:static')
    config.add_route('home',
                     '/',
                     view='imhotep.views.my_view',
                     view_renderer='templates/mytemplate.pt')
    return config.make_wsgi_app()
예제 #3
0
파일: tests.py 프로젝트: GunioRobot/imhotep
def _initTestingDB():
    from sqlalchemy import create_engine
    from imhotep.models import initialize_sql
    session = initialize_sql(create_engine('sqlite://'))
    return session
예제 #4
0
파일: tests.py 프로젝트: GunioRobot/imhotep
def _initTestingDB():
    from sqlalchemy import create_engine
    from imhotep.models import initialize_sql
    session = initialize_sql(create_engine('sqlite://'))
    return session