Re: [pylons-discuss] pyramid_rpc, decorate xmlrpc method?

2016-04-06 Thread Petr Blahos
Thanks Michael. That's great! -- Petr On Fri, Apr 1, 2016 at 5:26 PM, Michael Merickel wrote: > Pyramid's approach to decorators is that you may use the decorator= > argument. The xmlrpc_method forwards arguments to config.add_view so > everything that works with normal pyramid views will work

Re: [pylons-discuss] pyramid_rpc, decorate xmlrpc method?

2016-04-01 Thread Michael Merickel
Pyramid's approach to decorators is that you may use the decorator= argument. The xmlrpc_method forwards arguments to config.add_view so everything that works with normal pyramid views will work with your methods. def my_decorator(wrapped): def wrapper(context, request): # do stuff

[pylons-discuss] pyramid_rpc, decorate xmlrpc method?

2016-04-01 Thread Petr Blahos
Hi, I am using pyramid_rpc to define an xmlrpc api methods like this: @xmlrpc_method(endpoint='napi') def getiteminfo(request, wp, userid, item_type, pn): " the actual function " and I would like to wrap the methods with another decorator, in this case for measuring and debugging purposes.