def team(tid): teams = get_teams(id=tid, status="active") if not teams or not teams[0]: return pnf() team = teams[0] return render_template("pages/team/index.jade", title=team.name, team=team)
def admin_edit(tid): title = gettext("Edit Team") if request.method == "POST": # process post data and display a success message msg = "Success!" result_json = jsonify({"result": msg}) result_json.status_code = 200 return result_json else: teams = get_teams(id=tid) team_is_found = len(teams) is 1 if (team_is_found): team = json.dumps(teams[0].as_dict()) return render_template("pages/add-team/index.jade", title=title, team=team) else: return pnf()
def admin(): title = gettext("Pending Teams") teams = get_teams(status="pending", format="json") return render_template("pages/teams/index.jade", title=title, teams=teams)
def teams(): title = gettext("Teams") teams = get_teams(format="json", status="active") return render_template("pages/teams/index.jade", title=title, teams=teams)
def homepage(): title = False teams = get_teams(format="json", status="active") return render_template("pages/home.jade", title=title, teams=teams)