stats.py 文件源码

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

项目:scrobbler 作者: hatarist 项目源码 文件源码
def dashboard(period=None):
    period, days = PERIODS.get(period, PERIODS['1w'])

    col_year = func.extract('year', Scrobble.played_at)
    year_from, year_to = db.session.query(func.min(col_year), func.max(col_year)).first()
    year_from, year_to = int(year_from), int(year_to)

    return render_template(
        'dashboard.html',
        period=period,
        year_min=year_from,
        year_max=year_to,
    )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号