From 3082a5379ac5b5e949e79e4c473a013546ce7b6e Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Mon, 6 Oct 2008 18:25:57 -0600 Subject: More work on webui skeleton --- webui-cherry.py | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'webui-cherry.py') diff --git a/webui-cherry.py b/webui-cherry.py index f85a791af..985a838b0 100755 --- a/webui-cherry.py +++ b/webui-cherry.py @@ -19,18 +19,29 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA """ -A lightweight test server running using cherrypy. +A web-UI test server using cherrypy. """ from cherrypy import expose, config, quickstart -from ipa_webui.templates import main +from ipa_webui.templates import form, main +from ipa_webui import controller +from ipalib import api +from ipalib import load_plugins + + +api.finalize() + class root(object): - @expose - def index(self): - return main.serialize( - output='xhtml-strict', - format='pretty+nice', - ) + index = controller.Index(api, main) + + def __init__(self): + for cmd in api.Command(): + ctr = controller.Command(cmd, form) + setattr(self, cmd.name, ctr) + + + + quickstart(root()) -- cgit