def set_db(): if request.method == "POST": js = request.form.get("jsonDBData") jsonDBData = json.loads(js) for tableName, tableData in jsonDBData.iteritems(): current_user.set(tableName, tableData) return "success"
def set_db(): if request.method == 'POST': js= request.form.get('jsonDBData') jsonDBData = json.loads(js) print jsonDBData for tableName, tableData in jsonDBData.iteritems(): print str(tableName)+" : "+str(tableData) #tableID = tableData['id'] current_user.set(tableName, tableData) #print tableData return 'success'
def user_logout(): current_user.set('authenticated', False) logout_user() flash('Logout successful.', 'success') return redirect(url_for('index'))
def user_logout(): current_user.set('authenticated', False) logout_user() flash('Logout successful.', 'success') return home()