diff options
Diffstat (limited to 'src/root.py')
-rwxr-xr-x | src/root.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/root.py b/src/root.py index a352641..fb1a6ae 100755 --- a/src/root.py +++ b/src/root.py @@ -18,9 +18,23 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. from util import page +from login import common as lc import cherrypy +sites = dict() + class Root(page.Page): + def __init__(self, site, template_env): + if not site in sites: + sites[site] = dict() + if template_env: + sites[site]['template_env'] = template_env + super(Root, self).__init__(sites[site]) + + # now set up the default login plugins + self.login = lc.Login(self._site) + self.logout = lc.Logout(self._site) + def root(self): return self._template('index.html', title='Root') |