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:
parent
f25cc7aa03
commit
aece55c786
3
sms.py
3
sms.py
|
@ -300,6 +300,7 @@ class Web_Service (BaseHTTPRequestHandler):
|
||||||
elif self.path == '/list':
|
elif self.path == '/list':
|
||||||
self.send_response (200)
|
self.send_response (200)
|
||||||
self.send_header ('Content-type', 'text/html; charset=UTF-8')
|
self.send_header ('Content-type', 'text/html; charset=UTF-8')
|
||||||
|
self.send_header ('Refresh', '20')
|
||||||
self.end_headers ()
|
self.end_headers ()
|
||||||
ls = sms.thread_list ()
|
ls = sms.thread_list ()
|
||||||
lst = []
|
lst = []
|
||||||
|
@ -386,7 +387,7 @@ class Web_Service (BaseHTTPRequestHandler):
|
||||||
html_form_submit ('Send'),
|
html_form_submit ('Send'),
|
||||||
'/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 ()
|
html_footer ()
|
||||||
).encode ('utf-8'))
|
).encode ('utf-8'))
|
||||||
elif self.path [0:17] == '/messages?thread=':
|
elif self.path [0:17] == '/messages?thread=':
|
||||||
|
|
Loading…
Reference in New Issue