summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2014-03-28 14:07:11 -0400
committerSimo Sorce <simo@redhat.com>2014-03-28 14:10:23 -0400
commit134914682267592e2b42276255aff24bd2fabe6b (patch)
treec206e3a61c313ba6c1048770c2c383a185f2dddd
parenta5be918364744f92d73aa4b6589f3b9b33235d6d (diff)
downloadipsilon-134914682267592e2b42276255aff24bd2fabe6b.tar.gz
ipsilon-134914682267592e2b42276255aff24bd2fabe6b.tar.xz
ipsilon-134914682267592e2b42276255aff24bd2fabe6b.zip
Add common way to add a subtree to a page
Signed-off-by: Simo Sorce <simo@redhat.com>
-rwxr-xr-xipsilon/util/page.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ipsilon/util/page.py b/ipsilon/util/page.py
index 7dda1d7..7727dda 100755
--- a/ipsilon/util/page.py
+++ b/ipsilon/util/page.py
@@ -80,4 +80,10 @@ class Page(object):
def default(self, *args, **kwargs):
raise cherrypy.HTTPError(404)
+ def add_subtree(self, name, page):
+ self.__dict__[name] = page
+
+ def del_subtree(self, name):
+ del self.__dict__[name]
+
exposed = True