review/web_ui.py @ 96a4cc60e57d webui

Start adding infrastructure for the web interface.
author Steve Losh <steve@stevelosh.com>
date Tue, 13 Oct 2009 18:50:22 -0400
parents 7c9d165e0cd1
children 9539fb54320e
"""The review extension's web UI."""

import sys, os

top_path = os.path.split(os.path.split(os.path.realpath(__file__))[0])[0]
bundled_path = os.path.join(top_path, 'bundled')
webpy_path = os.path.join(bundled_path, 'webpy')

sys.path.insert(0, webpy_path)
import web


urls = (
    '/', 'index'
)

class index:
    def GET(self):
        return "Hello, world!"

app = web.application(urls, globals())

def load_interface(repo):
    sys.argv = sys.argv[:1]    # Seriously, web.py?  This is such a hack.
    app.run()