所以我试着用烧瓶
flask_classful
,我遵循上面描述的基本应用程序
http://flask-classful.teracy.org/
,我得到以下错误
未找到
在服务器上找不到请求的URL。如果您输入了URL
请手动检查拼写,然后重试。
这是我在handler.py中使用的基本代码
from flask import Flask
from flask_classful import FlaskView
# we'll make a list to hold some quotes for our app
quotes = [
"A noble spirit embiggens the smallest man! ~ Jebediah Springfield",
"If there is a way to do it better... find it. ~ Thomas Edison",
"No one knows what he can do till he tries. ~ Publilius Syrus"
]
app = Flask(__name__)
class QuotesView(FlaskView):
def index(self):
return "<br>".join(quotes)
QuotesView.register(app)
if __name__ == '__main__':
app.run()