manage.py 文件源码

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

项目:zsky 作者: wenguonideshou 项目源码 文件源码
def detail(info_hash):
    conn,curr = sphinx_conn()
    querysql='SELECT * FROM film WHERE info_hash=%s'
    curr.execute(querysql,info_hash)
    result=curr.fetchone()
    sphinx_close(curr,conn)
    #hash=Search_Hash.query.filter_by(id=id).first()
    if not result:
        return redirect(url_for('index'))        
    fenci_list=jieba.analyse.extract_tags(result['name'], 8)
    tags=Search_Tags.query.order_by(Search_Tags.id.desc()).limit(20)
    form=SearchForm()
    return render_template('detail.html',form=form,tags=tags,hash=result,fenci_list=fenci_list,sitename=sitename)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号