diff options
| author | Tres Seaver <tseaver@palladion.com> | 2009-04-29 21:34:09 +0000 |
|---|---|---|
| committer | Tres Seaver <tseaver@palladion.com> | 2009-04-29 21:34:09 +0000 |
| commit | 21707020158f1c161c402776148436ce82c7c5b6 (patch) | |
| tree | 5357c541a4479f7fc22a2126c51376f885d7c7d3 /repoze/bfg/traversal.py | |
| parent | 67b5b39d0510d1485593c92579e98a3f7a8f29ce (diff) | |
| download | pyramid-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.py | 6 |
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""" |
