md_blueprint.py 文件源码

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

项目:owllook 作者: howie6879 项目源码 文件源码
def noti_book(request):
    user = request['session'].get('user', None)
    if user:
        try:
            motor_db = motor_base.get_db()
            is_author = 0
            data = await motor_db.user_message.find_one({'user': user}, {'author_latest': 1, '_id': 0})
            if data:
                is_author = 1
                author_list = data.get('author_latest', {})
                return template('noti_book.html', title='???? - owllook'.format(user=user),
                                is_login=1,
                                is_author=is_author,
                                author_list=author_list,
                                user=user)
            else:
                return template('noti_book.html', title='???? - owllook'.format(user=user),
                                is_login=1,
                                is_author=is_author,
                                user=user)
        except Exception as e:
            LOGGER.error(e)
            return redirect('/')
    else:
        return redirect('/')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号