Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jinja2.exceptions.TemplateNotFound: bootstrap/base.html

I'm inheriting bootstrap/base.html in a Flask application after installing the Bootstrap Flask extension but having the below error:

jinja2.exceptions.TemplateNotFound: bootstrap/base.html
like image 841
Ameida Avatar asked Jun 01 '17 22:06

Ameida


2 Answers

The answer is correct.

You can test settings in the execution file, for example: flaskr/flaskr.py

from flask_bootstrap import Bootstrap
....
app = Flask(__name__)
bootstrap = Bootstrap(app)
db = SQLAlchemy(app)

The problem should have been solved.

like image 191
Gustavo Eduardo Belduma Avatar answered Nov 12 '22 22:11

Gustavo Eduardo Belduma


You need to import Bootstrap in this way below:

from flask_bootstrap import Bootstrap
...
bootstrap = Bootstrap(app)

flask.ext.bootstrap is deprecated

like image 20
user83655 Avatar answered Nov 12 '22 21:11

user83655