comparison webob_view/template/+package+/factory.py_tmpl @ 0:72cb6dc31e3f

initial commit of webob_view from https://svn.openplans.org/svn/standalone/templates/webob_view/trunk/
author k0s <k0scist@gmail.com>
date Tue, 27 Oct 2009 15:04:33 -0400
parents
children eb2cb7ebc849
comparison
equal deleted inserted replaced
-1:000000000000 0:72cb6dc31e3f
1 from ${package} import View
2 from paste.httpexceptions import HTTPExceptionHandler
3
4 def factory(global_conf, **app_conf):
5 """create a webob view and wrap it in middleware"""
6 keystr = '${project}.'
7 args = dict([(key.split(keystr, 1)[-1], value)
8 for key, value in app_conf.items()
9 if key.startswith(keystr) ])
10 app = View(**args)
11 return HTTPExceptionHandler(app)
12