From 42356a200d732fb14ae1d283d2a0102b6104002e Mon Sep 17 00:00:00 2001 From: Hossam Hammady Date: Sat, 18 May 2024 12:25:36 -0400 Subject: [PATCH] Fix rendering --- handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler.py b/handler.py index ae9348e..4158de1 100755 --- a/handler.py +++ b/handler.py @@ -1,4 +1,4 @@ -from flask import Flask, render_template_string +from flask import Flask, render_template from qusasat import Qusasat import base64 @@ -15,7 +15,7 @@ def run(event, context): global app, qusasat, base64_string quote = qusasat.get_random_quote() with app.app_context(): - body = render_template_string('quote.html', + body = render_template('quote.html', category=quote['category'], quote=quote['quote'], background_image_url=f'data:image/png;base64,{base64_string}')