Exemple #1
0
def index():
    user = users.find_by_id(get_userid())
    if user.has_not_registered_schedule_yet():
        return redirect(mobile_url_for("mobile.non_registered_practices"))
    ns = notices.find_showing()
    practice_count = scheds.count_schedules(scheds.TYPE_PRACTICE)
    game_count = scheds.count_schedules(scheds.TYPE_GAME)
    event_count = scheds.count_schedules(scheds.TYPE_EVENT)
    return render_template(
        "mobile/index.html",
        user=user,
        notices=ns,
        practice_count=practice_count,
        game_count=game_count,
        event_count=event_count,
    )
Exemple #2
0
def index():
    info_msgs = []
    if g.user:
        ns = notices.find_showing()
        info_msgs = info_msgs + [notice_to_message(n) for n in ns]
    return render_template('index.html', info_msgs=info_msgs)