fastapi-with-liveview/home.py

11 lines
252 B
Python
Raw Permalink Normal View History

2024-06-18 14:50:41 +02:00
async def send_page(websocket, templates, data_frontend):
await websocket.send_json(
{
'selector': '#main',
'html': templates.get_template(
f'pages/home.html'
).render(),
}
)