diff options
author | Marian Sigler <m@qjym.de> | 2012-09-28 03:10:09 +0200 |
---|---|---|
committer | Marian Sigler <m@qjym.de> | 2012-09-28 03:10:09 +0200 |
commit | a9b2f0624d5f9095747e9c2a8518199375c5e815 (patch) | |
tree | b0a6de8845fca2d8a1ce71e5dbccac0cde4639d3 /utils.py | |
parent | bbdc690a1f69c9e7f286a5fbd0cb64403d51c721 (diff) | |
download | web-a9b2f0624d5f9095747e9c2a8518199375c5e815.tar.gz web-a9b2f0624d5f9095747e9c2a8518199375c5e815.tar.bz2 web-a9b2f0624d5f9095747e9c2a8518199375c5e815.zip |
use context_processor to create a default context
Before, we did it in templated which a) is not the recommended way, b)
does only work when @templated is used and c) didn't work when directly
returning response objects.
Diffstat (limited to 'utils.py')
-rw-r--r-- | utils.py | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -28,11 +28,7 @@ def templated(template=None): if template_name is None: template_name = request.endpoint \ .replace('.', '/') + '.html' - - ctx = { - 'app': current_app, - } - ctx.update(f(*args, **kwargs)) + ctx = f(*args, **kwargs) if ctx is None: ctx = {} elif not isinstance(ctx, dict): |