summaryrefslogtreecommitdiff
path: root/repoze/bfg/urldispatch.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2009-01-25 20:52:35 +0000
committerChris McDonough <chrism@agendaless.com>2009-01-25 20:52:35 +0000
commit8cfe7068783a3520aa3bc09f260502d002e9ac60 (patch)
treea05a4b50ce747cfef448ef795b349d0128601549 /repoze/bfg/urldispatch.py
parenta6e0463027dee43c6aac487a9ea8bb844b1e8add (diff)
downloadpyramid-8cfe7068783a3520aa3bc09f260502d002e9ac60.tar.gz
pyramid-8cfe7068783a3520aa3bc09f260502d002e9ac60.tar.bz2
pyramid-8cfe7068783a3520aa3bc09f260502d002e9ac60.zip
- The ``repoze.bfg.urldispatch.RoutesRootFactory`` now injects the
``wsgiorg.routing_args`` environment variable into the environ when a route matches. This is a tuple of ((), routing_args) where routing_args is the value that comes back from the routes mapper match (the "match dict"). - The ``repoze.bfg.traversal.RoutesModelTraverser`` class now wants to obtain the ``view_name`` and ``subpath`` from the ``wsgiorgs.routing_args`` environment variable. It falls back to obtaining these from the context for backwards compatibility.
Diffstat (limited to 'repoze/bfg/urldispatch.py')
-rw-r--r--repoze/bfg/urldispatch.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/repoze/bfg/urldispatch.py b/repoze/bfg/urldispatch.py
index f1470cd25..0c71c6e74 100644
--- a/repoze/bfg/urldispatch.py
+++ b/repoze/bfg/urldispatch.py
@@ -177,6 +177,7 @@ class RoutesRootFactory(Mapper):
k = k.encode('utf-8')
kw[k] = v
context = factory(**kw)
+ environ['wsgiorg.routing_args'] = ((), kw)
provides = route._provides
for iface in provides:
alsoProvides(context, iface)