Thank you, Stifan and Anthony
On Thursday, 9 July 2015 11:34:19 UTC+2, Rakesh Singh wrote: > > Hello, > > Please could you assist with the following issue. > > I am attempting to create a web service, and have defined a function in > default.py that accepts an argument. > I notice that whenever I define a function which requires an argument, it > disappears from the the "exposes" list of default.py. > > *Example1 that works.* > > def count(): > session.counter = (session.counter or 0) + 1 > return dict(counter=session.counter, now=request.now) > > default.py > <https://sshipappldm1:8000/admin/peek/HiOnline/controllers/default.py?id=controllers__default__py> > exposes index <https://sshipappldm1:8000/>, user > <https://sshipappldm1:8000/user>, download > <https://sshipappldm1:8000/download>, call > <https://sshipappldm1:8000/call>, count <https://sshipappldm1:8000/count> > Calling web service works fine. > > *Example2 that does not work* > > def count(id): > session.counter = (session.counter or 0) + 1 > return dict(counter=session.counter, now=request.now) > > default.py > <https://sshipappldm1:8000/admin/peek/HiOnline/controllers/default.py?id=controllers__default__py> > exposes index <https://sshipappldm1:8000/>, user > <https://sshipappldm1:8000/user>, download > <https://sshipappldm1:8000/download>, call > <https://sshipappldm1:8000/call> > > Calling web service returns : > invalid function (default/count) > > Web2py 2.10.3-stable+timestamp.2015.04.02.21.42.07 running on Solaris 10 > > Any idea what I am missing? > > Thank you. > > Regards, > > Rakesh > > > > -- 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.

