|
a/Allura/allura/app.py |
|
b/Allura/allura/app.py |
|
... |
|
... |
44 |
if children is None:
|
44 |
if children is None:
|
45 |
children = []
|
45 |
children = []
|
46 |
self.children = children
|
46 |
self.children = children
|
47 |
|
47 |
|
48 |
def __getitem__(self, x):
|
48 |
def __getitem__(self, x):
|
|
|
49 |
"""
|
|
|
50 |
Automatically expand the list of sitemap child entries with the given items. Example:
|
|
|
51 |
SitemapEntry('HelloForge')[
|
|
|
52 |
SitemapEntry('foo')[
|
|
|
53 |
SitemapEntry('Pages')[pages]
|
|
|
54 |
]
|
|
|
55 |
]
|
|
|
56 |
|
|
|
57 |
TODO: deprecate this; use a more clear method of building a tree
|
|
|
58 |
"""
|
49 |
if isinstance(x, (list, tuple)):
|
59 |
if isinstance(x, (list, tuple)):
|
50 |
self.children.extend(list(x))
|
60 |
self.children.extend(list(x))
|
51 |
else:
|
61 |
else:
|
52 |
self.children.append(x)
|
62 |
self.children.append(x)
|
53 |
return self
|
63 |
return self
|