fixed?
This commit is contained in:
@@ -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/<path:filename>')
|
||||
def send_image(filename):
|
||||
#filename = os.path.join('resources', 'blooper.jpg')
|
||||
return send_from_directory('resources', 'blooper.jpg')
|
||||
return send_from_directory('resources', filename)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user