bug fix and update button
This commit is contained in:
22
server.py
22
server.py
@@ -167,7 +167,11 @@ def stop():
|
||||
ticker = pexpect.spawn("sudo -E taskset -c 3 python3 stockTicker.py")
|
||||
displaying_screensaver = False
|
||||
return index()
|
||||
|
||||
|
||||
@app.route("/update", methods=['PUT','POST'])
|
||||
def update():
|
||||
os.system("./update.sh")
|
||||
|
||||
@app.route("/display_format", methods = ['PUT', 'POST', 'GET'])
|
||||
def display_format():
|
||||
global professional
|
||||
@@ -209,24 +213,20 @@ def feature_settings():
|
||||
# saves files uploaded to the webpage for images and GIFs
|
||||
@app.route("/upload", methods = ['PUT', 'POST', 'GET'])
|
||||
def upload():
|
||||
|
||||
|
||||
try:
|
||||
|
||||
|
||||
images = request.files
|
||||
names = list(request.files.keys())
|
||||
for name in names:
|
||||
images[name].save('user_uploads/' +name)
|
||||
|
||||
|
||||
except Exception as e:
|
||||
print(e)
|
||||
|
||||
|
||||
|
||||
return index()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@app.route("/brightness", methods=['PUT','POST'])
|
||||
def brightness():
|
||||
global brightness
|
||||
@@ -247,7 +247,7 @@ def brightness():
|
||||
|
||||
f = open('csv/settings.csv', 'w+')
|
||||
f.write('speed,brightness\n')
|
||||
f.write(str(speed) + ',' + str(brightness))
|
||||
f.write(str(speed) + ',' + str(int(brightness) - 1))
|
||||
f.close()
|
||||
|
||||
global LastCommand
|
||||
|
Reference in New Issue
Block a user