Ok, I.m getting closer. So I change my url call, like this
url:'{{=URL('default','test2.json',args='data.datos')}}',
but I still have an empty reques.vars. How should I call the controller to
pass the data field as a json from the view scritp to the controller?
What I am looking for is to send the position.coords.latitude or vars like
these from the browser to a controler in server.
...
El martes, 16 de diciembre de 2014 17:57:07 UTC+1, Leonel Câmara escribió:
>
> Well it's supposed to be empty. You're calling the controller like this:
>
> http://127.0.0.1:8000/MFREG/default/test2.json
>
> This URL has neither args nor vars.
> http://127.0.0.1:8000/MFREG/default/test2.json
> Then you do this:
>
> datos = str(request.vars)
> datos2= request.args(0)
>
> request.vars is an empty Storage so when you convert it to string you get
> "<Storage()>", datos2 is None because there is no request.args(0)
>
>
>
--
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.