view redirectall/factory.py @ 1:3117c5556eca default tip

update redirectall
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 08 May 2011 19:14:21 -0700
parents 9e2187433034
children
line wrap: on
line source

from dispatcher import RedirectAll

def factory(global_conf, **app_conf):
    """create a webob view and wrap it in middleware"""
    keystr = 'redirectall.'
    args = dict([(key.split(keystr, 1)[-1], value)
                 for key, value in app_conf.items()
                 if key.startswith(keystr) ])
    return RedirectAll(**args)