summaryrefslogtreecommitdiffstats
path: root/webui-cherry.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-10-06 18:25:57 -0600
committerJason Gerard DeRose <jderose@redhat.com>2008-10-06 18:25:57 -0600
commit3082a5379ac5b5e949e79e4c473a013546ce7b6e (patch)
tree5f5528b0c18f014bae35d30193db883e950d17fd /webui-cherry.py
parentd38dcb6d39c87e2a35d94e86162a1d870fb1b2bc (diff)
downloadfreeipa-3082a5379ac5b5e949e79e4c473a013546ce7b6e.tar.gz
freeipa-3082a5379ac5b5e949e79e4c473a013546ce7b6e.tar.xz
freeipa-3082a5379ac5b5e949e79e4c473a013546ce7b6e.zip
More work on webui skeleton
Diffstat (limited to 'webui-cherry.py')
-rwxr-xr-xwebui-cherry.py27
1 files changed, 19 insertions, 8 deletions
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())