Home > front end >  How to reference flask blueprint flask_bootstrap
How to reference flask blueprint flask_bootstrap

Time:09-27

If inscribe
Installed PIP install flask_bootstrap, path.../venv/lib/python2.7/site - packages/flask_bootstrap

Application following structure
Myapp/
The config. Py
The run. Py
Requirements. TXT
Myapp/
Just set p y
Models. Py
Admin/
Just set p y
Views. Py
The static/
Templates/

Admin is defined as a blueprint for application, in the views. Py defined in a view and return render_template (' index.html '), the index, the base of inheriting the bootstrap in HTML. HTML, '{% extends the bootstrap/base. HTML "%}', in the myapp/set in py the from flask_bootstrap import the bootstrap, then the whole operation process without error, but access to view the bootstrap times can't find the template/base. The HTML,
Solving, blueprint of how to reference the bootstrap

CodePudding user response:

Has been solved, a great god, please ignore

CodePudding user response:

How reference ah I also encounter problems prompt jinja2. Exceptions. TemplateNotFound

TemplateNotFound: index.html
I think it's not instantiate so didn't find the index

CodePudding user response:

Should need to initialize the
The bootstrap=the bootstrap (app)
  • Related