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)
评论列表
文章目录