diff --git a/app/routes.py b/app/routes.py index cfc7e55fcdcc02c1bf46c7f545b1e1f36bc47fc1..d80418e430e8fa5513a2b99143721bae483e4456 100644 --- a/app/routes.py +++ b/app/routes.py @@ -2,12 +2,22 @@ from os.path import join from flask import render_template, send_from_directory from app import app -app.config['PLOTS_PATH'] = "plots" + +PLOTS_PATH = "plots" + + +PLOTS = [ + ['dom_activity', 'dom_rates'], + ['pmt_rates', 'pmt_hrv'], + ['trigger_rates'], + ] + @app.route('/') def index(): - return render_template('plots.html') + return render_template('plots.html', plots=PLOTS) + @app.route('/plots/<path:filename>') def custom_static(filename): - return send_from_directory(join(app.root_path, "../plots"), filename) + return send_from_directory(join(app.root_path, PLOTS_PATH), filename)