Issue
in place of newyork
I want to pass form.city.data
which is a input from form by the user.
<div>
<iframe height="800" width="100%" class="p-5 embed-responsive-item"
src="{{ url_for('static',filename='videos/newyork.html') }}" allowfullscreen></iframe>
</div>
Solution
u can try this way
{% set path = url_for('static',filename='videos/' + form.city.data + '.html') %}
<div>
<iframe height="800" width="100%" class="p-5 embed-responsive-item"
src="{{ path }}" allowfullscreen>
</iframe>
</div>
Answered By - Dương Thái
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.