incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [15/50] git commit: [#4718] add docstring for SitemapEntry tree building
Date Wed, 19 Sep 2012 18:43:27 GMT
[#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 <dbrondsema@geek.net>
Authored: Mon Sep 10 20:56:05 2012 +0000
Committer: Cory Johns <johnsca@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:


Mime
View raw message