Mercurial > hg > redirectall
annotate 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 |
rev | line source |
---|---|
1 | 1 from dispatcher import RedirectAll |
0 | 2 |
3 def factory(global_conf, **app_conf): | |
4 """create a webob view and wrap it in middleware""" | |
5 keystr = 'redirectall.' | |
6 args = dict([(key.split(keystr, 1)[-1], value) | |
7 for key, value in app_conf.items() | |
8 if key.startswith(keystr) ]) | |
1 | 9 return RedirectAll(**args) |
0 | 10 |