Add common way to add a subtree to a page
[cascardo/ipsilon.git] / ipsilon / util / page.py
index 7dda1d7..7727dda 100755 (executable)
@@ -80,4 +80,10 @@ class Page(object):
     def default(self, *args, **kwargs):
         raise cherrypy.HTTPError(404)
 
     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
     exposed = True