def manage_poster():
    if not current_user.is_admin and not current_user.is_coach:
        return redirect(url_for('main.index'))
    poster_form = form.PosterForm()
    return render_template('manage_poster.html',
                           title=u'首页图片管理',
                           poster=poster.items(),
                           pform=poster_form)
Example #2
0
def manage_poster():
    if not current_user.is_admin and not current_user.is_coach:
        return redirect(url_for('main.index'))
    poster_form = form.PosterForm()
    return render_template('manage_poster.html',
                           title = u'首页图片管理',
                           poster = poster.items(),
                           pform = poster_form)
Example #3
0
def index():
    recent_news = news_server.get_recent(sortTop=True)
    return render_template('index/index.html',
                           title = 'CUIT ACM Team',
                           poster = poster.items(),
                           recent_news = recent_news,
                           recommend_site = config.RECOMMEND_SITE,
                           RECENT_CONTEST_JSON = RECENT_CONTEST_JSON)