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
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
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.