from flask import Flask, render_template, jsonify app = Flask(__name__) @app.route("/data") def data(): data = { 'water_temperature': [20, 19, 20, 21, 20, 21], 'water_temperature_x': ['2018-05-20', '2018-05-21', '2018-05-22', '2018-05-23', '2018-05-24', '2018-05-27'], 'air_temperature': [27, 32, 26, 29, 30, 31], 'air_temperature_x': ['2018-05-21', '2018-05-22', '2018-05-23', '2018-05-24', '2018-05-25', '2018-05-27'], } return jsonify(data) @app.route("/") def hello(): return render_template('seepark_web.html')