try fixing weather image

This commit is contained in:
2024-12-16 13:43:38 -06:00
parent 4e7fce8ba3
commit 82d0389db4
2 changed files with 6 additions and 7 deletions

View File

@@ -94,7 +94,9 @@ def dashboard():
days=days,
today=today,
weather=weather(),
extra_debug=extra_debug
extra_debug=extra_debug,
HOST = os.getenv('HOST'),
HOST_PORT = os.getenv('HOST_PORT')
)
@app.route('/image')
@@ -120,6 +122,6 @@ def dashboard_image():
# css=os.path.join(os.path.dirname(__file__),'static','style.css')
)
image_file = Image.open(out_file) # open colour image
image_file = ImageOps.grayscale(image_file)
# image_file = ImageOps.grayscale(image_file)
image_file.save(out_file, 'BMP')
return send_from_directory(directory = 'static', path=f'out.{extension}', as_attachment=False, attachment_filename=f'out.{extension}')