> from gluon import current > response = current.response > > class View(object): > def __init__(self, path): > ........ > def __call__(self, fn): > def _call(): > response.view = self.path >
No, don't do that. If you assign current.response to response at the top level in the module, it will not be updated on each request. Instead, in the _call() function, do current.response.view = self.path. Anyway, I agree with Niphod -- this seems like a completely gratuitous use of a decorator. Anthony -- --- 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/groups/opt_out.

