Jan-28-2019, 09:06 PM
SOLVED!!!
Thank you guys! I have solved it. Heres my code for sensors.py
My warmest regards to stullis and snippsat
Thank you guys! I have solved it. Heres my code for sensors.py
@bp.route('/sensors') @login_required def sensors(): return render_template('sensors/sensors.html', sensorsID=sensorsID, read_sensor=read_sensor)and here is my code for sensors.html
{%block content %} <h1>Sensors temperature list</h1> <table> {% for i in sensorsID %} <tr> <th> Sensor {{ sensorsID[i]['name'] }}</th> <td> temperature is {{ read_sensor(sensorsID[i]['ID']) }} </td> </tr> {% endfor %} </table> {% endblock %}this gives this (well I would have put a screen shot here but I cant work out how to do it!)
My warmest regards to stullis and snippsat