Reputation: 151
My .py app return xml response from API, I want to write value of messageKey 'notFound' into the .html page.
Ex of response:
<response>
<returncode>FAILED</returncode>
<messageKey>notFound</messageKey>
<message>We could not find a meeting with that meeting ID</message>
</response>
EX of .html:
#....
<div class="row">
<p id="demo"></p>
</div>
#....
Any kind of help please?
Upvotes: 0
Views: 68
Reputation: 151
I solve this by:
.py:
@flask.route('/admin')
def index():
return render_template("admin.html", variable=soup)
.html:
<div class="row">
<p>{{variable}}</p>
</div>
Upvotes: 1