The methods to get the data in the view of web2py does not seem working. I
used the method mentioned in
http://web2py.com/books/default/chapter/29/10/services which is
<script>
$.getJSON('/application/default/weekdays',
function(data){series: [{
type: 'area',
name: 'Response(kW)',
data: data
}]
});
for plotting purpose and it did not work; even the plot did not show up. I
also used the method in
http://www.web2pyslices.com/slice/show/1334/consuming-a-web2py-json-service-with-jquery
that
basically say
jQuery.getJSON("{{=URL(r=request,f='call',args=['json','get_days'])}}",
function(data){...});
My controller:
def getdata():
rows = db().select(db.test.id, db.test.x, orderby=db.test.id)
return json.dumps([[r.id, r.x] for r in rows])
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.