leaderboard.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:FRG-Crowdsourcing 作者: 97amarnathk 项目源码 文件源码
def index(window=0):
    """Get the last activity from users and projects."""
    if current_user.is_authenticated():
        user_id = current_user.id
    else:
        user_id = None

    if window >= 10:
        window = 10

    top_users = cached_users.get_leaderboard(current_app.config['LEADERBOARD'],
                                             user_id=user_id,
                                             window=window)

    response = dict(template='/stats/index.html',
                    title="Community Leaderboard",
                    top_users=top_users)
    return handle_content_type(response)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号