__init__.py 文件源码

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

项目:SDV-Summary 作者: Sketchy502 项目源码 文件源码
def blogindividual(id):
    page_init()
    try:
        blogid = int(id)
        db = get_db()
        cur = db.cursor()
        cur.execute("SELECT id,time,author,title,post,live FROM blog WHERE id="+app.sqlesc+" AND live='1'",(blogid,))
        blogdata = cur.fetchone()
        if blogdata != None:
            blogdata = list(blogdata)
            blogdata[1] = datetime.datetime.fromtimestamp(blogdata[1])
            blogposts = {'posts':(blogdata,),'total':1}
            return render_template('blog.html',full=True,offset=0,recents=get_recents(),blogposts=blogposts,**page_args())
        else:
            g.error = _("No blog with that ID!")
    except:
        g.error = _("No blog with that ID!")
    return render_template('error.html',**page_args())
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号