No, as is, that will only wrap the function itself. However, you can
explicitly execute the view and return the rendered HTML instead of the
dictionary from the function:
def statsd(f):
blah.start()
result = f()
if isinstance(result, dict):
result = response.render(result)
It works great ! Thanks. One question tho: it should include the time spent
rendering the html view, right ?
On Wednesday, December 16, 2015 at 11:10:11 PM UTC+2, Anthony wrote:
>
> response._caller is a function that wraps all controller actions, so
> something like this might work:
>
> def sta
response._caller is a function that wraps all controller actions, so
something like this might work:
def statsd(f):
blah.start()
result = f()
blah.stop()
return result
response._caller = statsd
Anthony
On Wednesday, December 16, 2015 at 2:49:25 PM UTC-5, Octavian G wrote:
>
> H
3 matches
Mail list logo