summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCasey Duncan <casey.duncan@gmail.com>2010-12-15 00:03:46 -0700
committerCasey Duncan <casey.duncan@gmail.com>2010-12-15 00:03:46 -0700
commit408c5c8ccaf520d0711738d87a300e13ee600192 (patch)
treebc066d0f03ab54fb1123760538a42b2a1d24c553 /docs
parentd1959613c6b865815dfb624944e2c2709f622bda (diff)
downloadpyramid-408c5c8ccaf520d0711738d87a300e13ee600192.tar.gz
pyramid-408c5c8ccaf520d0711738d87a300e13ee600192.tar.bz2
pyramid-408c5c8ccaf520d0711738d87a300e13ee600192.zip
clarify how __parent__ and __name__ relate to containers recursively
Diffstat (limited to 'docs')
-rw-r--r--docs/narr/models.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/docs/narr/models.rst b/docs/narr/models.rst
index a2eac7084..c726ae9b4 100644
--- a/docs/narr/models.rst
+++ b/docs/narr/models.rst
@@ -256,15 +256,15 @@ The ``__parent__`` of the root object should be ``None`` and its
__name__ = ''
__parent__ = None
-A node returned from the root item's ``__getitem__`` method should
-have a ``__parent__`` attribute that is a reference to the root
-object, and its ``__name__`` attribute should match the name by which
-it is reachable via the root object's ``__getitem__``. *That*
-object's ``__getitem__`` should return objects that have a
-``__parent__`` attribute that points at that object, and
-``__getitem__``-returned objects should have a ``__name__`` attribute
-that matches the name by which they are retrieved via ``__getitem__``,
-and so on.
+A node returned from the root item's ``__getitem__`` method should have
+a ``__parent__`` attribute that is a reference to the root object, and
+its ``__name__`` attribute should match the name by which it is
+reachable via the root object's ``__getitem__``. A container under the
+root should have a ``__getitem__`` that returns objects with a
+``__parent__`` attribute that points at the container, and these
+subobjects should have a ``__name__`` attribute that matches the name by
+which they are retrieved from the container via ``__getitem__``.
+This pattern continues recursively down the graph.
.. warning:: If your root model object has a ``__name__`` argument
that is not ``None`` or the empty string, URLs returned by the