Dalius, what for is ``app`` def ?
7 def authorize(function=None):
8 """
9 This is a decorator which can be used to decorate a Pylons
controller action.
10 It gives function ``function`` environ dictionary and
executes it. Function
11 should return either True or False.
12 """
13 def validate(func, self, *args, **kwargs):
14 def app(environ, start_response):
15 return func(self, *args, **kwargs)
16 authorize_request(request.environ, function)
17 return func(self, *args, **kwargs)
18 return decorator(validate)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---