Remove unnecessary layer of abstraction over template rendering

This commit is contained in:
Sunil Mohan Adapa committed 2014-05-05 00:08:58 +05:30
1 parent 851536ffbe
commit 4b44741c68
23 files changed
+136 -105

No files matched your search

+7 -2
View File
@@ -1,9 +1,14 @@
"""
Controller to provide login and logout actions
"""
import cherrypy
import cfg
from plugin_mount import PagePlugin
from modules.forms import Form
from auth import *
# Controller to provide login and logout actions
import util
class AuthController(PagePlugin):
def __init__(self, *args, **kwargs):
@@ -23,7 +28,7 @@ class AuthController(PagePlugin):
form.text_input("Passphrase", name="passphrase", type="password")
form.submit(label="Login")
return self.fill_template(main=form.render(), sidebar_right=" ")
return util.render_template(main=form.render(), sidebar_right=" ")
@cherrypy.expose
def login(self, username=None, passphrase=None, from_page=cfg.server_dir+"/", **kwargs):