Creating html page with JavaScript based on web server

88 views
Skip to first unread message

ay exbizy

unread,
Sep 15, 2012, 6:13:28 AM9/15/12
to we...@googlegroups.com
Hello,

I need an idea or steps on creating a basic web page to publish data(sensor data), I have my web.py server based on a python framework running and retrieving data from a store and I want to expose the data and plot a graph on a HTML page.

Any help with this or reference to any materials online for this.

Thanks

Sébastien Auvray

unread,
Sep 17, 2012, 6:06:04 AM9/17/12
to we...@googlegroups.com
Hello,
 
You can use a template for your page. For the graph, there are two ways using matplotlib :
 - in your GET (or POST) method, generate an image from matplotlib, store it in /static (for example) and provide the url to your template. You'll have to remove the image later or /static will grow up.
 - in your template, generate an url containing all required parameters for the graph, and respond by generating the image (with matplotlib) on the fly, so you don't have to store an image on disk.
 
Hope that helps.
 
Sébastien.

Tomas Schertel

unread,
Sep 17, 2012, 9:34:16 AM9/17/12
to we...@googlegroups.com
If you don't mind using javascript, you can create realtime graphics using http://www.flotcharts.org/
Reply all
Reply to author
Forward
0 new messages