예제 #1
0
파일: routes.py 프로젝트: tinta/uwrtourist
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)
예제 #2
0
파일: routes.py 프로젝트: tinta/uwrtourist
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()
예제 #3
0
파일: routes.py 프로젝트: tinta/uwrtourist
def admin():
    title = gettext("Pending Teams")
    teams = get_teams(status="pending", format="json")
    return render_template("pages/teams/index.jade", title=title, teams=teams)
예제 #4
0
파일: routes.py 프로젝트: tinta/uwrtourist
def teams():
    title = gettext("Teams")
    teams = get_teams(format="json", status="active")
    return render_template("pages/teams/index.jade", title=title, teams=teams)
예제 #5
0
파일: routes.py 프로젝트: tinta/uwrtourist
def homepage():
    title = False
    teams = get_teams(format="json", status="active")
    return render_template("pages/home.jade", title=title, teams=teams)