def main(): c = Config() reddit = c.praw() dbconn = DB(c) sess = dbconn.session() source = sys.argv[1] regions = Region.patch_from_json(sess, json_file=source, verbose=True)
def main(): c = Config() reddit = c.praw() dbconn = DB(c) dbconn.drop_all() dbconn.create_all() sess = dbconn.session() source = sys.argv[1] regions = Region.create_from_json(sess, json_file=source) stamp()
def main(): c = Config() reddit = c.praw() dbconn = DB(c) dbconn.drop_all() dbconn.create_all() sess = dbconn.session() source = sys.argv[1] regions = Region.create_from_json(sess, json_file=source) # Create team DB entries TeamInfo.create_defaults(sess, c) stamp()
def create(): c = Config() dbconn = DB(c) sess = dbconn.session() # Create team DB entries TeamInfo.create_defaults(sess, c)
def update(): c = Config() dbconn = DB(c) sess = dbconn.session() # Create team DB entries ora = sess.query(TeamInfo).filter_by(id=0).first() ora.greeting = """ Your team welcomes you! """ per = sess.query(TeamInfo).filter_by(id=1).first() per.greeting = """ Your team welcomes you! """ sess.commit() print "Greetings updated"