[Soap-Python] Multiple decorators
Burak Arslan
burak.arslan at arskom.com.tr
Thu Sep 29 17:47:40 CEST 2011
On 29.09.2011 18:32, azurIt wrote:
> Thank you.
>
> Problem is that i'm doing quite complex things in my decorator and for this i need to:
> 1.) call decorator only for selected methods - it is possible to filter this in events ?
class AuthenticatedServiceBase(ServiceBase):
pass
AuthenticatedServiceBase.event_manager.add_listener('method_call',
_check_login)
and have your authenticated methods' service extend that.
> 2.) pass some parameters to decorator which differs per method (for example permissions needed to call a method)
> 3.) share variables between space 'before call' and 'after call', maybe this is possible via MethodContext ?
ctx.udc is your friend. conceptually, events and decorators do the same
thing.
did you actually read the manual? i talk about such scenarios. or maybe
it's difficult to understand the documentation?
best,
burak
More information about the Soap
mailing list