view MoinMoin/server/ @ 3107:c6e39279f83b

refactor logging usage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 23 Feb 2008 22:59:30 +0100
parents 80e1a910a2f1
children b6edaabd06b7
line wrap: on
line source
    MoinMoin - WSGI application

    Minimal code for using this:

    from MoinMoin.server.server_wsgi import WsgiConfig, moinmoinApp

    class Config(WsgiConfig):

    config = Config() # you MUST create an instance to initialize logging!
    # use moinmoinApp here with your WSGI server / gateway

    @copyright: 2005 Anakim Border <>,
                2007 MoinMoin:ThomasWaldmann
    @license: GNU GPL, see COPYING for details.

from MoinMoin.server import Config
from MoinMoin.request import request_wsgi

class WsgiConfig(Config):
    """ WSGI default config """

def moinmoinApp(environ, start_response):
    request = request_wsgi.Request(environ)
    start_response(request.status, request.headers)
    return [request.output()]