In the example you are exposing a function

def f(a,b): return a+b

which sums a and b. There is nothing special about a and b.
You can expose any function with takes any parameters you like.
Once you create a function you just decorate it with

@service.json

if you want to reurn its value as json, or with

@service.jsonrpc

if you want to be able to call it via json rpc. etc etc.

On Mar 8, 7:32 am, Fran <[email protected]> wrote:
> mdipierro wrote:
> > Has anybody tried this yet?
>
> Looks very promising, but I must confess that I don't understand how
> to use it.
> I put it all into a test controller & it runs but I don't see how to
> get this to work with my data.
> - just returns 34 or "34" currently, which doesn't mean anything...
> What are the 'a' & 'b' supposed to be?
>
> F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to