20 lines
500 B
Python
20 lines
500 B
Python
|
from datetime import datetime
|
||
|
|
||
|
async def send_page(websocket, templates, data_frontend):
|
||
|
await websocket.send_json(
|
||
|
{
|
||
|
'selector': '#main',
|
||
|
'html': templates.get_template(
|
||
|
f'pages/about_us.html'
|
||
|
).render(),
|
||
|
}
|
||
|
)
|
||
|
|
||
|
async def current_time(websocket, templates, data_frontend):
|
||
|
await websocket.send_json(
|
||
|
{
|
||
|
'selector': '#time',
|
||
|
'html': f"<datetime>{datetime.now()}</datetime>",
|
||
|
}
|
||
|
)
|