You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2012/09/19 20:43:27 UTC

[15/50] git commit: [#4718] add docstring for SitemapEntry tree building

[#4718] add docstring for SitemapEntry tree building


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/191db166
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/191db166
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/191db166

Branch: refs/heads/master
Commit: 191db166132235520e7b92f7e60a316cd4966dd8
Parents: 29dc95e
Author: Dave Brondsema <db...@geek.net>
Authored: Mon Sep 10 20:56:05 2012 +0000
Committer: Cory Johns <jo...@geek.net>
Committed: Fri Sep 14 20:58:17 2012 +0000

----------------------------------------------------------------------
 Allura/allura/app.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/191db166/Allura/allura/app.py
----------------------------------------------------------------------
diff --git a/Allura/allura/app.py b/Allura/allura/app.py
index 8c13987..72dddee 100644
--- a/Allura/allura/app.py
+++ b/Allura/allura/app.py
@@ -46,6 +46,16 @@ class SitemapEntry(object):
         self.children = children
 
     def __getitem__(self, x):
+        """
+        Automatically expand the list of sitemap child entries with the given items.  Example:
+            SitemapEntry('HelloForge')[
+                SitemapEntry('foo')[
+                    SitemapEntry('Pages')[pages]
+                ]
+            ]
+
+        TODO: deprecate this; use a more clear method of building a tree
+        """
         if isinstance(x, (list, tuple)):
             self.children.extend(list(x))
         else: