now has a picture
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
from flask import render_template
|
from flask import render_template
|
||||||
from app import app
|
from app import app
|
||||||
|
from flask import send_file
|
||||||
|
|
||||||
@app.route('/')
|
@app.route('/')
|
||||||
@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())}
|
||||||
return render_template('status.html', device=device, status=status)
|
return render_template('status.html', device=device, status=status)
|
||||||
|
|
||||||
|
@app.route('/plot.png')
|
||||||
|
def plot():
|
||||||
|
#filename = os.path.join('resources', 'blooper.jpg')
|
||||||
|
return send_from_directory('resources', 'blooper.jpg')
|
||||||
|
|
||||||
|
|||||||
BIN
resources/blooper.jpg
Normal file
BIN
resources/blooper.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Reference in New Issue
Block a user