Hatta Wiki

annotate examples/hatta.fcg @ 2226:ffd8f6808c56

fix #76 use WikiResponse in _serve_default
author Radomir Dopieralski <sheep-devel@sheep.art.pl>
date Sun Jun 05 13:36:34 2011 +0200 (11 months ago)
parents 02c0d780d0b7
children
rev   line source
sheep@130 1 #!/usr/bin/python
sheep@163 2 # -*- coding: utf-8 -*-
sheep@163 3
sheep@130 4 import flup
sheep@186 5 import sys
sheep@186 6 # XXX Uncomment and edit this if hatta.py is not installed in site-packages
sheep@186 7 #sys.path.insert(0, "/path/to/dir/with/hatta/")
sheep@130 8 import hatta
sheep@130 9
sheep@130 10 config = hatta.WikiConfig(
sheep@130 11 pages_path='/path/to/pages/', # XXX Edit this!
sheep@130 12 cache_path='/path/to/cache/', # XXX Edit this!
sheep@130 13 )
sheep@308 14 config.parse_args()
sheep@308 15 config.parse_files()
sheep@308 16 config.sanitize()
sheep@185 17 wiki = hatta.Wiki(config)
sheep@185 18 app = wiki.application
sheep@185 19
sheep@185 20 # XXX Uncomment this, if you are using fastcgi on / on Lighttpd
sheep@185 21 #def app(env, start):
sheep@185 22 # env['PATH_INFO'] = env['SCRIPT_NAME'] + env['PATH_INFO']
sheep@185 23 # env['SCRIPT_NAME'] = ''
sheep@185 24 # return wiki.application(env, start)
sheep@185 25
sheep@130 26 flup.server.fcgi.WSGIServer(app).run()