我遇到了一些问题,要得到一个简单的flask应用程序来使用flask引导包。在
根据文档,我安装了flaskbootstrap,创建了下面的2个文件,这个文件运行得很好。我面临的问题是索引.html在浏览器中,我只看到文本引导/基本.html返回,当我查看源代码时,没有看到对引导css文件的引用。在
感谢你对我在这里遗漏了什么的指导。 谢谢。在
初始化py
from flask import Flask, render_template
from flask.ext.bootstrap import Bootstrap
app = Flask(__name__)
bootstrap = Bootstrap(app)
@app.route("/")
def homepage():
return render_template('index.html')
if __name__ == "__main__":
app.run(debug=True)
索引.html
^{pr2}$
感谢您提供有关virtualenv的设置和正确使用的提示。在
经过进一步的挖掘,我发现应该在的顶部添加以下两行烧瓶app.wsgi因为我在为我的应用程序创建的虚拟环境上安装了引导程序,即venv
相关问题 更多 >
编程相关推荐