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"
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"
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"
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"
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)