I am trying to use python flask framework to build a webpage. This webpage is a dashboard, which has two divs. The first div is a table, each row of which is the info for a certain stock. The second div is a chart which shows the price curve for one of the stocks in the first table.
I would like to refresh the second chart based on the selection from the first table. For example, if I click on the name of stock A in the first table, the price curve for A is then showed in the second chart.
One way to implement this, is to link each stock name to a different url, and have a html file associated with each url address. A series of render_template functions have to be defined in the view.py script.
I wonder if there's a more generic way to implement this. Maybe one function definition and one html template would be enough for all stocks in the table?
thanks!