From 0ff9a894dbe1a1d6b71b74649a05bce2a91f5808 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 21 Oct 2009 16:37:03 +0000 Subject: - The name ``root`` is available as an attribute of the request slightly earlier now (before a NewRequest event is emitted). ``root`` is the result of the application "root factory". --- CHANGES.txt | 4 ++++ repoze/bfg/router.py | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index f050ab041..79990471e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -17,6 +17,10 @@ Features This is effectively a goto, useable by code that has no capability to otherwise return a response. +- The name ``root`` is available as an attribute of the request + slightly earlier now (before a NewRequest event is emitted). + ``root`` is the result of the application "root factory". + Bug Fixes --------- diff --git a/repoze/bfg/router.py b/repoze/bfg/router.py index c87065e14..03b929d8f 100644 --- a/repoze/bfg/router.py +++ b/repoze/bfg/router.py @@ -72,6 +72,7 @@ class Router(object): # into the environ directly attrs = environ.setdefault('webob.adhoc_attrs', {}) attrs['registry'] = registry + attrs['root'] = root threadlocals['request'] = request registry.has_listeners and registry.notify(NewRequest(request)) -- cgit v1.2.3