janprontooneconnect.py 文件源码

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

项目:python-tarantool-benchmark-and-bootstrap 作者: valentinmk 项目源码 文件源码
def async_good(request):
    """Good page handler."""
    global db
    global jinja
    data = {
        "title": "Top of the best stikers for Telegram",
        "active_good": "class=\"active\"",
        "active_bad": "",
        "top": {}
    }
    session = await session_handler(request=request)
    cookies_for_responce = SimpleCookie()
    cookies_for_responce['new'] = session['new']
    cookies_for_responce['stickers'] = session['stickers']
    data["top"] = await db.get_top(12, 'ITERATOR_LE')
    text = jinja.get_template('good.html').render(
        title=data["title"],
        active_good=data["active_good"],
        active_bad=data["active_bad"],
        top=data["top"]
    )
    return request.Response(
        text=text,
        mime_type='text/html',
        cookies=cookies_for_responce)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号