Hatta Wiki

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/examples/hatta.fcg	Sun Jun 05 13:36:34 2011 +0200
     1.3 @@ -0,0 +1,26 @@
     1.4 +#!/usr/bin/python
     1.5 +# -*- coding: utf-8 -*-
     1.6 +
     1.7 +import flup
     1.8 +import sys
     1.9 +# XXX Uncomment and edit this if hatta.py is not installed in site-packages
    1.10 +#sys.path.insert(0, "/path/to/dir/with/hatta/")
    1.11 +import hatta
    1.12 +
    1.13 +config = hatta.WikiConfig(
    1.14 +    pages_path='/path/to/pages/', # XXX Edit this!
    1.15 +    cache_path='/path/to/cache/', # XXX Edit this!
    1.16 +)
    1.17 +config.parse_args()
    1.18 +config.parse_files()
    1.19 +config.sanitize()
    1.20 +wiki = hatta.Wiki(config)
    1.21 +app = wiki.application
    1.22 +
    1.23 +# XXX Uncomment this, if you are using fastcgi on / on Lighttpd
    1.24 +#def app(env, start):
    1.25 +#    env['PATH_INFO'] = env['SCRIPT_NAME'] + env['PATH_INFO']
    1.26 +#    env['SCRIPT_NAME'] = ''
    1.27 +#    return wiki.application(env, start)
    1.28 +
    1.29 +flup.server.fcgi.WSGIServer(app).run()