This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.route("/history_sensor") | |
def history_sensor(): | |
#query= request.args['query'] | |
print(query) | |
database=sqlite3.connect('d.db') | |
database.row_factory = dict_factory | |
cursor=database.cursor() | |
cursor.execute(query) #zapytanie query | |
readings = cursor.fetchall() | |
return render_template('history_sensor.html', readings=readings) |