contrib/deploy/wsgi.py @ 34df61cd0a47

guts: rename some files to make things cleaner
author Steve Losh <steve@stevelosh.com>
date Tue, 15 Jun 2010 20:40:50 -0400
parents d56ad4bf9dd5
children f61b33b27999
# An example WSGI script for serving hg-review's web UI.
# Edit as necessary.

# If hg-review is not on your webserver's PYTHONPATH, uncomment the lines
# below and point it at the hg-review/review directory.
import sys
sys.path.insert(0, "/path/to/hg-review/review")

REPO = '/path/to/your/repo'
READ_ONLY = True
ALLOW_ANON_COMMENTS = False
ANON_USER = 'Anonymous <anonymous@example.com>'
SITE_ROOT = 'http://yoursite.com/optional/path'
TITLE = 'Your Project'

from mercurial import hg, ui
from web import app

_ui = ui.ui()
_ui.setconfig('ui', 'user', ANON_USER)
repo = hg.repository(_ui, REPO)

app.read_only = READ_ONLY
app.allow_anon = ALLOW_ANON_COMMENTS
app.site_root = SITE_ROOT.rstrip('/')
app.title = TITLE
app.debug = False
app.ui = _ui
app.repo = repo

application = app