Passing HTML page to template in Flask -



Passing HTML page to template in Flask -

lets have html page containing little html code.how can pass html page template in flask? know can pass html content template(we can utilize markup('string here'). if have name of html page, how can it?

if want users utilize script of yours, register design on app when extension initialized , inquire users utilize include script should go:

{% include 'your-extension-name/your-script.html' %}

this assumes design has folder construction this:

your_extension_name/ __init__.py other files.here templates/ your-extension-name/ your-script.html

alternately, can utilize approach taken flask-debugtoolbar , monkey-patch flask's request / response handling auto-inject html (but approach bit fragile , long place here).

flask

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -