flask 蓝图如何引用flask_bootstrap
豆先生 2016-08-31 04:52:04 如题
已安装 pip install flask_bootstrap,路径.../venv/lib/python2.7/site-packages/flask_bootstrap
应用结构如下
myapp/
config.py
run.py
requirements.txt
myapp/
__init__.py
models.py
admin/
__init__.py
views.py
static/
templates/
admin 定义为蓝图应用,在views.py中定义一个视图并return render_template('index.html'),index.html 中继承bootstrap中的base.html,‘{% extends "bootstrap/base.html" %}’ 。在myapp/__init__.py 中 from flask_bootstrap import Bootstrap 了,然后整个运行过程无报错,但是访问视图时报找不到模板bootstrap/base.html。
求解,蓝图中如何引用bootstrap