summaryrefslogtreecommitdiff
path: root/repoze/bfg/traversal.py
diff options
context:
space:
mode:
authorTres Seaver <tseaver@palladion.com>2009-04-29 21:34:09 +0000
committerTres Seaver <tseaver@palladion.com>2009-04-29 21:34:09 +0000
commit21707020158f1c161c402776148436ce82c7c5b6 (patch)
tree5357c541a4479f7fc22a2126c51376f885d7c7d3 /repoze/bfg/traversal.py
parent67b5b39d0510d1485593c92579e98a3f7a8f29ce (diff)
downloadpyramid-21707020158f1c161c402776148436ce82c7c5b6.tar.gz
pyramid-21707020158f1c161c402776148436ce82c7c5b6.tar.bz2
pyramid-21707020158f1c161c402776148436ce82c7c5b6.zip
Drop the ILocation testing by default during traversal.
Diffstat (limited to 'repoze/bfg/traversal.py')
-rw-r--r--repoze/bfg/traversal.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/repoze/bfg/traversal.py b/repoze/bfg/traversal.py
index 60d388809..6c2e6aa9a 100644
--- a/repoze/bfg/traversal.py
+++ b/repoze/bfg/traversal.py
@@ -382,6 +382,7 @@ _marker = object()
class ModelGraphTraverser(object):
classProvides(ITraverserFactory)
implements(ITraverser)
+ SUPPLY_LOCATION_PROXIES = False
def __init__(self, root):
self.root = root
@@ -406,7 +407,7 @@ class ModelGraphTraverser(object):
ob = vroot = self.root
name = ''
- locatable = ILocation.providedBy(ob)
+ locatable = self.SUPPLY_LOCATION_PROXIES and ILocation.providedBy(ob)
i = 1
@@ -431,6 +432,9 @@ class ModelGraphTraverser(object):
return ob, '', [], traversed, vroot, vroot_path
+class WrappingModelGraphTraverser(ModelGraphTraverser):
+ SUPPLY_LOCATION_PROXIES = True
+
class TraversalContextURL(object):
""" The IContextURL adapter used to generate URLs for a context
object obtained via graph traversal"""