I am trying to render an HTML page using Chalice and Jinja2, but when I use the @route decorator to specify the route, the HTML page is not rendering as expected. Here's my code:
The issue I'm experiencing is that when I access the /docs route, the HTML page is not being rendered as expected. Instead, it's returning the raw HTML code as text. The HTML page I'm trying to render looks like this:
<!DOCTYPE html>
My API
Expected Behavior:
I expect that when I access the /docs route, the HTML page should be rendered and displayed in the browser as shown in the provided HTML template.
Additional Information:
Chalice Version: 1.29.0
Python Version: python 3.10.12
Operating System: linux 6.2.0-32-generic
Any help to resolve this issue would be greatly appreciated. Thank you!
I am trying to render an HTML page using Chalice and Jinja2, but when I use the @route decorator to specify the route, the HTML page is not rendering as expected. Here's my code:
The issue I'm experiencing is that when I access the /docs route, the HTML page is not being rendered as expected. Instead, it's returning the raw HTML code as text. The HTML page I'm trying to render looks like this:
<!DOCTYPE html>
Expected Behavior:
I expect that when I access the /docs route, the HTML page should be rendered and displayed in the browser as shown in the provided HTML template.
Additional Information:
Chalice Version: 1.29.0 Python Version: python 3.10.12 Operating System: linux 6.2.0-32-generic Any help to resolve this issue would be greatly appreciated. Thank you!