X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/0959d38b27c03863ec376839dcc6d896d04e36ea..c79f6c48cae9411acf3f413b25d942df34f7719f:/philo/contrib/shipherd/models.py diff --git a/philo/contrib/shipherd/models.py b/philo/contrib/shipherd/models.py index f35be3c..a520fbe 100644 --- a/philo/contrib/shipherd/models.py +++ b/philo/contrib/shipherd/models.py @@ -179,6 +179,15 @@ class Navigation(Entity): """ :class:`Navigation` represents a group of :class:`NavigationItem`\ s that have an intrinsic relationship in terms of navigating a website. For example, a ``main`` navigation versus a ``side`` navigation, or a ``authenticated`` navigation versus an ``anonymous`` navigation. + A :class:`Navigation`'s :class:`NavigationItem`\ s will be accessible from its related :class:`.Node` and that :class:`.Node`'s descendants through a :class:`NavigationMapper` instance at :attr:`Node.navigation`. Example:: + + >>> node.navigation_set.all() + [] + >>> parent = node.parent + >>> items = parent.navigation_set.get(key='main').roots.all() + >>> parent.navigation["main"] == node.navigation["main"] == list(items) + True + """ #: A :class:`NavigationManager` instance. objects = NavigationManager()