def search_resultts(): new_friend = bottle.request.query['friend'] my_username = login_check() connection = pymongo.Connection(connection_string, safe=True) friend.delete_friend(connection, my_username, new_friend) bottle.redirect("/main")
def delete_friend(): new_friend = None try: new_friend = request.query['friend'] except KeyError: redirect("/main") my_username = login_check() connection = pymongo.Connection(connection_string, safe=True) friend.delete_friend(connection, my_username, new_friend) redirect("/main")