How to communicate between python and html page using flask framework? : <p>I am building a web-app on top of hadoop(its for internal use) using python's flask framework using jinja2 templates. I have a requirement where I need to communicate/do some changes on existing html. I am  not sure how to do that.</p>

<p>The only way I know is to use:</p>

<pre><code>render_template('xyz.html',some_vale=some_value)
</code></pre>

<p>But this will render the template again.</p>

<p>Following are the task that I need to achieve:</p>

<ol>
<li><p>The requirement would be to pop up a bootstrap toast when I get an acknowledgement that the data is inserted into hive successfully. I do not want to use flash module in flask.</p></li>
<li><p>One more requirement is to show/hide loading dialog while I fetch the data from database. Once the search request is initiated, till the data is fetched, the dialog should be visible and then it should disappear.</p></li>
</ol>

<p>How can talk to HTML from python like we do in java script using id.</p>

<p>Appreciate the help.</p>
