python用flask页面跳转失败

home.py的代码:
from flask import Blueprint,session,Flask,request,redirect,url_for,render_template,flashhome_view = Blueprint('home', __name__)@home_view.route('/',methods=['GET','POST'])def homep(): return render_template('login.html')login.html的代码
<!DOCTYPE html><html><head lang="en"> <meta charset="UTF-8"> <title></title></head><body>login page</body></html>
跳转的时候提示The requested URL was not found on the server.请问各位老师该如何修改?谢谢.

#1.1 shop list
#meshidaren.py 文件下中包含以下代码
@app.route('/shoplist',methods=['GET','POST'])
def show_goods_to_buy():
c = g.db.cursor()#读取数据库
que="select * from goods_to_buy where fridge_id='w111'"
c.execute(que)
items = list(c.fetchall())
return render_template("my_shoplist.html",items=items)#跳到html页面,并传参
温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-06-30
可能是app没有注册该Blueprint的问题本回答被提问者采纳