mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Remove unnecessary layer of abstraction over template rendering
This commit is contained in:
1 parent
851536ffbe
commit
4b44741c68
23 files changed
+136
-105
No files matched your search
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user