# HG changeset patch # User Marcin Kuzminski # Date 2017-07-14 10:49:53 # Node ID 9104b27d65541ebc8dc547518bc67767890cd6bd # Parent 4a76cf6b408ba3b1a122de1c4e4f0abe92a6fc72 pyramid: expose a temporary TemplateContext under `_c` diff --git a/rhodecode/apps/_base/__init__.py b/rhodecode/apps/_base/__init__.py --- a/rhodecode/apps/_base/__init__.py +++ b/rhodecode/apps/_base/__init__.py @@ -137,6 +137,10 @@ class BaseAppView(object): local_tmpl_args = { 'defaults': {}, 'errors': {}, + # register a fake 'c' to be used in templates instead of global + # pylons c, after migration to pyramid we should rename it to 'c' + # make sure we replace usage of _c in templates too + '_c': tmpl_args } local_tmpl_args.update(tmpl_args) return local_tmpl_args