I tried to read file print.html
that located in path: templates/print.html
.
So, I used url_for()
to refer to it as below:
{{ url_for('templates', filename='print.html') }}
However, I got an error as below Traceback:
BuildError: ('templates', {'filename': 'print.html'}, None)
What's wrong with this?
If I used {{ url_for('static', filename='print.html') }}
, it just working find. However, file that I tried to read is not in static
folder, it was in templates/print.html
instead.
How can I use url_for()
to read my file print.html
in templates
folder? Thanks.