diff --git a/app/routes.py b/app/routes.py index 33e3021..27f7ad9 100644 --- a/app/routes.py +++ b/app/routes.py @@ -7,11 +7,11 @@ from flask import send_from_directory @app.route('/index') def index(): 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) -@app.route('/blooper.png') -def plot(): +@app.route('/images/') +def send_image(filename): #filename = os.path.join('resources', 'blooper.jpg') - return send_from_directory('resources', 'blooper.jpg') + return send_from_directory('resources', filename)