summaryrefslogtreecommitdiff
path: root/docs
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 /docs
parent67b5b39d0510d1485593c92579e98a3f7a8f29ce (diff)
downloadpyramid-21707020158f1c161c402776148436ce82c7c5b6.tar.gz
pyramid-21707020158f1c161c402776148436ce82c7c5b6.tar.bz2
pyramid-21707020158f1c161c402776148436ce82c7c5b6.zip
Drop the ILocation testing by default during traversal.
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/models.rst13
-rw-r--r--docs/narr/security.rst12
2 files changed, 25 insertions, 0 deletions
diff --git a/docs/narr/models.rst b/docs/narr/models.rst
index c07dfbe18..e9eddf39b 100644
--- a/docs/narr/models.rst
+++ b/docs/narr/models.rst
@@ -110,6 +110,19 @@ root node says it implements the ``ILocation`` :term:`interface`,
will dynamically assign a ``__name__`` and a ``__parent__`` to it,
recursively.
+.. note::
+ In order to use this feature, you must register the
+ ``WrappingModelGraphTraverser`` as the traversal policy, rather
+ than the standard ``ModelGraphTraverser``. E.g., your application
+ will need to have the following in its ``configure.zcml``::
+
+ <adapter
+ factory="repoze.bfg.traversal.WrappingModelGraphTraverser"
+ provides="repoze.bfg.interfaces.ITraverserFactory"
+ for="*"
+ />
+
+
If you choose to make use of the location-based dynamic assignment of
``__parent__`` and ``__name__``, the root node must have a
``__parent__`` that is ``None``, a ``__name__`` with any value, and it
diff --git a/docs/narr/security.rst b/docs/narr/security.rst
index 91c7240dc..590b90b2e 100644
--- a/docs/narr/security.rst
+++ b/docs/narr/security.rst
@@ -179,6 +179,18 @@ during traversal in a *location proxy* that has both the ``__name__``
and ``__parent__`` attributes, but otherwise acts the same as your
model object.
+.. note::
+ In order to use this feature, you must register the
+ ``WrappingModelGraphTraverser`` as the traversal policy, rather
+ than the standard ``ModelGraphTraverser``. E.g., your application
+ will need to have the following in its ``configure.zcml``::
+
+ <adapter
+ factory="repoze.bfg.traversal.WrappingModelGraphTraverser"
+ provides="repoze.bfg.interfaces.ITraverserFactory"
+ for="*"
+ />
+
You can of course supply ``__name__`` and ``__parent__`` attributes
explicitly on all of your model objects, and no location proxying will
be performed.