This commit is contained in:
2019-08-19 21:00:57 -05:00
parent 12e956912e
commit 24d24ac294

View File

@@ -7,11 +7,11 @@ from flask import send_from_directory
@app.route('/index') @app.route('/index')
def index(): def index():
device = {'name': 'find how to get name later'} device = {'name': 'find how to get name later'}
status = {'temperature': float(open('/sys/class/thermal/thermal_zone0/temp').read())} status = {'temperature': float(open('/sys/class/thermal/thermal_zone0/temp').read()) / 1000}
return render_template('status.html', device=device, status=status) return render_template('status.html', device=device, status=status)
@app.route('/blooper.png') @app.route('/images/<path:filename>')
def plot(): def send_image(filename):
#filename = os.path.join('resources', 'blooper.jpg') #filename = os.path.join('resources', 'blooper.jpg')
return send_from_directory('resources', 'blooper.jpg') return send_from_directory('resources', filename)