--
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/ljp1IcabuSE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
response.view = self.pathdef _call():def __call__(self, fn):def __init__(self, path):class View(object):response = current.responsefrom gluon import current
........
response.view = self.pathdef _call():def __call__(self, fn):def __init__(self, path):class View(object):response = current.responsefrom gluon import current
........
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--