Mercurial > hg > clwapp
view clwapp/factory.py @ 3:672addc0c4be
more fixup
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 20 Dec 2011 12:44:40 -0800 |
parents | 196f241286f7 |
children |
line wrap: on
line source
from clwapp import View from paste.httpexceptions import HTTPExceptionHandler def factory(global_conf, **app_conf): """create a webob view and wrap it in middleware""" config = [ 'command' ] key_str = 'clwapp.%s' args = dict([(key, app_conf[ key_str % key]) for key in config if app_conf.has_key(key_str % key) ]) app = View(**args) return HTTPExceptionHandler(app)