def delete_index(username): user = Users.get(username) if user: current_user.delete_index() return "index for {} deleted".format(username) else: return "no user {}".format(username)
def delete_index(username): if User.get(username) == current_user: if current_user.is_authenticated: current_user.delete_index() return "index for {} deleted".format(username) else: return "sorry you can't delete index for {}".format(username)
def delete_index(username): user = Users.get(username) if user: current_user.delete_index() EventLogger.new_event(msg="index for {} deleted".format(user.id)) return "index for {} deleted".format(username) else: return "no user {}".format(username)
def activities(username): if (User.get(username) == current_user): if request.args.get("rebuild"): current_user.delete_index() return render_template("activities.html", user=current_user) else: return "sorry"