how to create real-time web pages with web2py ?

133 views
Skip to first unread message

hgh_...@163.com

unread,
Nov 14, 2015, 6:49:20 AM11/14/15
to web2py-usuarios
how to create real-time web pages with web2py ?
for example, I can display the user register numbers in a web page, or 
I can update a chart periodically to get a real-time effect by using a timer to insert the new data in the plot and redraw it.

isi_jca

unread,
Nov 18, 2015, 4:43:22 PM11/18/15
to web2py-usuarios
Hi!!!.

In the next link http://www.web2pyslices.com/slice/show/1335/client-tools-for-web2py, there is an example about a timer. Example

This will call a server function once after 5 seconds:

def index():
    callback = js.call_function(handle_it)
    page.ready(js.delay(callback, 5000))
    return dict()
def handle_it():
    return js.alert("Gotcha!")
Greetings.
Reply all
Reply to author
Forward
0 new messages