title: Calling python functions in HTML file in Flask
body: <p>I have a list of folders in my python file, and in an HTML file I iterate over the list to display the names of each folder on my page.  </p>
  
  <pre><code>{% for folder in folders %}
  &lt;li&gt;&lt;a href = {{folder}}&gt; {{folder}}&lt;/a&gt;&lt;/li&gt;
  {% endfor %}
  </code></pre>
  
  <p>What I am trying to do is make it so when you click on the folder, it will do the same thing, but inside the clicked folder. I have a function <code>open_folder</code> that takes one parameter (the clicked folder name), but my problem is that I don't really know how to call the function with a parameter in the HTML file. A lot of pages or tutorials I have seen only have the python files.  In my main file I also have the route as</p>
  
  <pre><code>/&lt;route&gt;/
  </code></pre>
  
  <p>I am new to Flask and was just wondering if anybody had examples for how to do this.  It would be much appreciated. </p>