def profile(user_id): # current_user is the login-in user, check whether the current user want to view his own profile. current_user = Context.from_object( __get_api(API_USER, {"token": session.get("token")})) searched_user = Context.from_object( __get_api(API_USER, params={"user_id": user_id})) if "id" in current_user and "id" in searched_user and current_user.id == searched_user.id: return redirect("/user/profile") return render("/user/profile.html")
def try_template(template_id): return render("/manage/testtemplate.html")
def template_edit(): return render("/template/create.html")
def template_create_from_existing(template_id): return render("/template/create.html", template_id=template_id)
def template_index(): return render("/template/index.html")
def user_hackathon_list(): return render("/user/team.html")
def user_profile_edit(): return render("/user/profile_edit.html")
def user_profile(): return render("/user/profile.html")
def user_team_hackathon(hackathon_name): return render("/team/team.html", hackathon_name=hackathon_name)
def team_list(): return render("/team/index.html")
def manageddas(path): return render("/base/manage.html")
def myhackathon2(): return render("/base/manage.html")
def create_event(): return render("/create_event.html", islocal=is_local())