summaryrefslogtreecommitdiff
path: root/repoze/bfg/configure.zcml
diff options
context:
space:
mode:
authorChris McDonough <chrism@agendaless.com>2008-08-06 03:30:40 +0000
committerChris McDonough <chrism@agendaless.com>2008-08-06 03:30:40 +0000
commit39fccbbfbceacaf1b3d5fb6f03a07fbe4d861969 (patch)
treeb06b38c284eae4e37bd46bc5b1182153cff8b7fa /repoze/bfg/configure.zcml
parente17c8d815136218d7dd07e21cf78f4104d773d48 (diff)
downloadpyramid-39fccbbfbceacaf1b3d5fb6f03a07fbe4d861969.tar.gz
pyramid-39fccbbfbceacaf1b3d5fb6f03a07fbe4d861969.tar.bz2
pyramid-39fccbbfbceacaf1b3d5fb6f03a07fbe4d861969.zip
- Small url dispatch overhaul: the ``connect`` method of the
``urldispatch.RoutesMapper`` object now accepts a keyword parameter named ``context_factory``. If this parameter is supplied, it must be a callable which returns an instance. This instance is used as the context for the request when a route is matched. - The registration of a RoutesModelTraverser no longer needs to be performed by the application; it's in the bfg ZCML now.
Diffstat (limited to 'repoze/bfg/configure.zcml')
-rw-r--r--repoze/bfg/configure.zcml6
1 files changed, 6 insertions, 0 deletions
diff --git a/repoze/bfg/configure.zcml b/repoze/bfg/configure.zcml
index e57558cd2..78dce0b83 100644
--- a/repoze/bfg/configure.zcml
+++ b/repoze/bfg/configure.zcml
@@ -9,6 +9,12 @@
for="* .interfaces.IRequest"
/>
+ <adapter
+ factory=".urldispatch.RoutesModelTraverser"
+ provides=".interfaces.ITraverserFactory"
+ for=".interfaces.IRoutesContext .interfaces.IRequest"
+ />
+
<include file="meta.zcml" />
</configure>