What does that mean?
Well, you could just not put them in the
templates directory and then read them, but then you can’t us
Jinja2templating on your
So how can we achieve this?
Here’s the code:
from flask import ..., render_template_string ... @app.route('/') def index(): with ('any/path/you/want/your/html/file/to/be/in.html', 'r') as content: return render_template_string(content, ...) ...
So, what happened? Well, first I read the file and then passed it contents to a