From: Simo Sorce Date: Fri, 28 Mar 2014 18:07:11 +0000 (-0400) Subject: Add common way to add a subtree to a page X-Git-Tag: v0.2.2~54 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fipsilon.git;a=commitdiff_plain;h=134914682267592e2b42276255aff24bd2fabe6b;ds=sidebyside Add common way to add a subtree to a page Signed-off-by: Simo Sorce --- 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