def setup_db(db=env.dbname, dbuser=env.dbuser, dbpasswd=env.dbpassword): if not pg.user_exists(dbuser): pg.create_user(dbuser, dbpasswd, groups=['gisgroup']) if not pg.database_exists(db): pg.create_database(db, dbuser, template='template_postgis')
def setup_db(user=env.dbuser, password='', db=env.dbname): if not pg.user_exists(user): pg.create_user(user, password) if not pg.database_exists(db): pg.create_database(db, user, template='template_postgis')