From 2fb8bff093e49d95ab25eb8343ebbb1091f6e7a6 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 24 Jan 2014 14:26:15 -0500 Subject: Implement login plugin infrastructure Signed-off-by: Simo Sorce --- ipsilon/root.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ipsilon/root.py') diff --git a/ipsilon/root.py b/ipsilon/root.py index e445dc5..30f6b43 100755 --- a/ipsilon/root.py +++ b/ipsilon/root.py @@ -18,9 +18,24 @@ # along with this program. If not, see . from ipsilon.util.page import Page +from ipsilon.login.common import Login +from ipsilon.login.common import Logout + +sites = dict() class Root(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 = Login(self._site) + self.logout = Logout(self._site) + def root(self): return self._template('index.html', title='Root') -- cgit