[web2py] Re: JSON getting the series data into view
Yes, thats the reason i think. Thanks! -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: JSON getting the series data into view
definitely something is going on with your setup: did you play with routes ? the default scheme includes the app name right after the host name, and that's why you got the example with /app/controller/function. On Tuesday, September 13, 2016 at 5:38:11 PM UTC+2, Aydin wrote: > > @Niphlod and Brian: > Sorry that was my mistake, I mixed up the codes. > the actual code was: > >
[web2py] Re: JSON getting the series data into view
Sorry that was my mistake, the actual code was:
[web2py] Re: JSON getting the series data into view
Make sure you are using the correct URL to retrieve the data. I just did a test of that example from the book by creating a controller and index view and it works as expected. In your original post you show $.getJSON('/application/default/weekdays', and in your last reply you suggest you tested it by viewing in browser /app/default/getdata those are very different obviously but without further details I will assume you are using one or the other. /application needs to be the name of your actual application it could be "examples", "welcome", or some custom name you gave the application. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: JSON getting the series data into view
then please check with whoever wrote """ function(data){series: [{ type: 'area', name: 'Response(kW)', data: data }] """ PS: may I suggest that you'd need to call /app/default/getdata*.json *that sets automatically also the correct content-type for json ? On Tuesday, September 13, 2016 at 1:39:19 PM UTC+2, Aydin wrote: > > Im sure it has to do with my code not web2py. > Yes in the browser i did /app/default/getdata and it returned correctly > [[1,2],[2,3]]. > By the way i import json and also use @service.json. > -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: JSON getting the series data into view
Im sure it has to do with my code not web2py. Yes in the browser i did /app/default/getdata and it returned correctly [[1,2],[2,3]]. By the way i import json and also use @service.json. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[web2py] Re: JSON getting the series data into view
did you check if your js is working before blaming web2py ? On Tuesday, September 13, 2016 at 3:46:52 AM UTC+2, Aydin wrote: > > 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 > >