Mercurial > hg > clwapp
view clwapp/factory.py @ 7:a0816f433861 default tip
py3
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Tue, 24 Nov 2020 12:56:21 -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)