老师我的网站找不到服务器不知道是什么原因造成的,拼写我也检查了没有错。
来源:8-11 显示搜索结果页面

jingjing_0005
2018-05-22
@web.route('/book/search')
def search():
form = SearchForm(flask.request.args)
books = BookCollection()
if form.validate():
q = form.q.data.strip()
page = form.page.data
isbn_or_key = is_isbn_or_key(q)
yushu_book = YuShuBook()
if isbn_or_key == 'isbn':
yushu_book.search_by_isbn(q)
else:
yushu_book.search_by_keywrod(q, page)
books.fill(yushu_book, q)
else:
flask.flash('key word can\'t be found, please input another word')
return flask.render_template('search_result.html', books=books)
1回答
-
flask.flash('key word can\'t be found, please input another word')
return flask.render_template('search_result.html', books=books)多了个flask 改
flash('key word can\'t be found, please input another word')
return render_template('search_result.html', books=books)012018-06-07
相似问题