def show_user(user_id): this_user = User.get_one_user({"id": user_id}) return render_template("user.html", user=this_user)
def delete_user(user_id): User.delete_user({"id": user_id}) return redirect("/users")
def index(): return render_template("/index.html", users=User.get_all())
def register_success(user_id): if 'user_id' not in session: return "You are not logged in <br><a href = '/'>" + "Click Here to Login</a>" data = {"user_id": user_id} return render_template('welcome.html', user=User.get_by_id(data))
def edit_user_form(user_id ): data={ "id":user_id } return render_template("edit_user.html", my_user= User.get_user(data))
def delete(id): data = {"id": id} User.destroy(data) return redirect("/")
def delete_user(id): data = {"id": id} User.destroy(data) return redirect('/all_users')
def user_update(id): data = {"id": id} users = User.user_update(data) return render_template('update_user.html', users=users)
def edit_user(id): data = {"id": id} user = User.get_one(data) return render_template('edit.html', user=user)
def update_user(): User.update(request.form) return redirect('/all_users')
def show_user(id): data = {"id": id} user = User.get_one(data) return render_template('show.html', user=user)
def all_users(): users = User.get_all() return render_template('read_all.html', all_users=users)
def delete_user(user_id ): data={ "id":user_id } User.delete_user(data) return redirect("/users")
def user_data_delete(id): data = {"id": id} User.user_data_delete(data) return redirect('/')
def read(id): data = {"id": id} return render_template("user.html", user=User.get_by_id(data))
def user_show(id): data = {"id": id} users = User.user_show(data) return render_template('show_user.html', users=users)
def edit_user(id): data = {"id": id} return render_template("edit.html", user=User.get_by_id(data))
def index(): return render_template('index.html', users=User.get_all_users())
def user_info(user_id): data={ "id":user_id } return render_template("user_info.html", my_user= User.get_user(data) )