def add_renderer_globals(event):
    event['c'] = request.tmpl_context
event['tmpl_context'] = request.tmpl_context
config.add_subscriber(add_renderer_globals, 'pyramid.events.BeforeRender')
Эквивалент контекста шаблона в Pyramid (пользователь pylons)