X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/c19bf577d44606d2b284e6058d633f4a174b61cc..c79f6c48cae9411acf3f413b25d942df34f7719f:/philo/contrib/shipherd/models.py?ds=inline 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()