Autorefresh for people

*I know* I can use AJAX, but I don't have the skills yet, I will do the job waiting for AJAX refresh.
Pages are light, that's not a big deal.
This commit is contained in:
Sasha MOREL 2021-09-05 19:04:26 +02:00
parent f25cc7aa03
commit aece55c786
1 changed files with 2 additions and 1 deletions

3
sms.py
View File

@ -300,6 +300,7 @@ class Web_Service (BaseHTTPRequestHandler):
elif self.path == '/list':
self.send_response (200)
self.send_header ('Content-type', 'text/html; charset=UTF-8')
self.send_header ('Refresh', '20')
self.end_headers ()
ls = sms.thread_list ()
lst = []
@ -386,7 +387,7 @@ class Web_Service (BaseHTTPRequestHandler):
html_form_submit ('Send'),
'/send'
) +
html_iframe ('/messages?thread=' + str (id), , height = '100%', width = '100%', name = 'messages')
html_iframe ('/messages?thread=' + str (id), height = '80%', width = '100%', name = 'messages') +
html_footer ()
).encode ('utf-8'))
elif self.path [0:17] == '/messages?thread=':