def initialize_database(config): with dbapi2.connect(config) as connection: cursor = connection.cursor() profile.initialize_profiles(config) Interaction_c.initialize_interaction(config) connection.commit() return 'tables are created <a href="http://itucsdb1601.mybluemix.net">Home</a>'
def checkM3(): return Interaction_c.check3(app.config['dsn'])
def insertM_blocked(): Interaction_c.follow_blocked(app.config['dsn']) return render_template('blocked.html')
def checkM2(): return Interaction_c.check2(app.config['dsn'])
def insertM_following(): Interaction_c.follow_following(app.config['dsn']) return render_template('following.html')
def searchM_blocked(): return Interaction_c.search_blocked(app.config['dsn'])
def insertM(): Interaction_c.follow(app.config['dsn']) return render_template('followers.html')
def searchM_following(): return Interaction_c.search_following(app.config['dsn'])
def searchM(): return Interaction_c.search(app.config['dsn'])
def updateM_blocked(): return Interaction_c.update_blocked(app.config['dsn'])
def updateM_following(): return Interaction_c.update_following(app.config['dsn'])
def updateM(): return Interaction_c.update(app.config['dsn'])
def find_following(): return Interaction_c.find(app.config['dsn'])