0

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?

1 Answer 1

1

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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.