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)
评论列表
文章目录