예제 #1
0
파일: mobile.py 프로젝트: kzkn/fc
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,
    )
예제 #2
0
파일: general.py 프로젝트: missundaztood/fc
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)