diff options
author | Simo Sorce <simo@redhat.com> | 2014-03-28 14:07:11 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2014-03-28 14:10:23 -0400 |
commit | 134914682267592e2b42276255aff24bd2fabe6b (patch) | |
tree | c206e3a61c313ba6c1048770c2c383a185f2dddd /ipsilon/util | |
parent | a5be918364744f92d73aa4b6589f3b9b33235d6d (diff) | |
download | ipsilon-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>
Diffstat (limited to 'ipsilon/util')
-rwxr-xr-x | ipsilon/util/page.py | 6 |
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 |