loading and refreshing dynamic html files in Python Flask -


i have web application creating going run on local (iis) server. have reports generated in local html files(currently put in templates folder) viewed browser. reports (html files) updated daily incorporate new information , plots (bokeh). perf2.html file called inside report.html using url_for{{'performance_report'}} routes.py file.

my folders organized  /main_app.py /routes.py /static    /perf1.html /templates    /perf2.html    /report.html  

my question is: best way load these files , have browser or server refresh picks change. okay put them in templates folder or static folder. when put them in static folder , change them, browser not refresh. web app used few people. understand can put these html reports in static folder (which think faster). @ end of web app development, have few hundred html report files of 20kb each. nice not have create routes each html file using render_template.

also note have not put on iis yet. using flask's development server.

@app.route('/') def main():     url = url_for('report')     link = '<a href = "'+url+'"> go reports! </a>'     return link   @app.route('/report1') def report():     return render_template('report.html')      @app.route('/performance_report')     def performance_report():         return render_template('perf2.html') 

i new flask , not find on dealing changing html files updated in browser/server. not sure if should use methods in route update html files? suggestions?


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -