jinja2.exceptions.TemplateNotFound: bootstrap/base.html
14,124
Solution 1
You need to import Bootstrap in this way below:
from flask_bootstrap import Bootstrap
...
bootstrap = Bootstrap(app)
flask.ext.bootstrap is deprecated
Solution 2
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.
Solution 3
If it's a full flask project, u need to do these:
from flask_bootstrap import Bootstrap
bootstrap = Bootstrap(app)
inside your __init__.py
file
Solution 4
Need to import Bootstrap from flask.ext.bootstrap and bootstrap the flask app as below:
from flask.ext.bootstrap import Bootstrap
...
bootstrap = Bootstrap(app)
Related videos on Youtube

Author by
Ameida
Passionate programmer and team leader with 14 years experience. I enjoy being actively involved in team's tasks and problems solving. I like the transfer of technical and business knowledge within and across teams.
Updated on June 04, 2022Comments
-
Ameida 5 months
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
-
Billal Begueradj about 5 yearsBy the time you posted the question, the import should be done as shown in the accepted answer, instead.