コード例 #1
0
def setup_app(command, conf, vars):
    """Place any commands to setup wiki20 here"""
    load_environment(conf.global_conf, conf.local_conf)
    # Load the models
    from wiki20 import model
    print "Creating tables"
    model.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)

    transaction.commit()
    print "Successfully setup"
コード例 #2
0
ファイル: websetup_v1.py プロジェクト: clsdaniel/tg2docs
def setup_app(command, conf, vars):
    """Place any commands to setup wiki20 here"""
    load_environment(conf.global_conf, conf.local_conf)
    # Load the models
    from wiki20 import model
    print "Creating tables"
    model.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)


    transaction.commit()
    print "Successfully setup"
コード例 #3
0
def setup_config(command, filename, section, vars):
    """Place any commands to setup wiki20 here"""
    conf = appconfig('config:' + filename)
    load_environment(conf.global_conf, conf.local_conf)
    # Load the models
    from wiki20 import model
    print "Creating tables"
    model.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)


    model.DBSession.commit()
    print "Successfully setup"
コード例 #4
0
ファイル: websetup_v2.py プロジェクト: clsdaniel/tg2docs
def setup_app(command, conf, vars):
    """Place any commands to setup wiki20 here"""
    load_environment(conf.global_conf, conf.local_conf)
    # Load the models
    from wiki20 import model

    print "Creating tables"
    model.metadata.create_all(bind=config["pylons.app_globals"].sa_engine)

    # Create the initial data
    print "Creating initial data"

    page = model.Page("FrontPage", "initial data")

    model.DBSession.add(page)

    transaction.commit()
    print "Successfully setup"
コード例 #5
0
ファイル: websetup.py プロジェクト: clsdaniel/tg2docs
def setup_config(command, filename, section, vars):
    """Place any commands to setup wiki20 here"""
    conf = appconfig('config:' + filename)
    load_environment(conf.global_conf, conf.local_conf)
    # Load the models
    from wiki20 import model
    print "Creating tables"
    model.metadata.create_all(bind=config['pylons.app_globals'].sa_engine)

    # Create the initial data
    print "Creating initial data"
    
    page = model.Page("FrontPage", "initial data")
    
    model.DBSession.add(page)

    transaction.commit()
    print "Successfully setup"
コード例 #6
0
ファイル: __init__.py プロジェクト: garrettmc/TGWikiTutorial
def setup_app(command, conf, vars):
    """Place any commands to setup wiki20 here"""
    load_environment(conf.global_conf, conf.local_conf)
    setup_schema(command, conf, vars)
    bootstrap(command, conf, vars)
コード例 #7
0
ファイル: __init__.py プロジェクト: HOZCAR/Personal-Examples
def setup_app(command, conf, vars):
    """Place any commands to setup wiki20 here"""
    load_environment(conf.global_conf, conf.local_conf)
    setup_schema(command, conf, vars)
    bootstrap(command, conf, vars)