Mercurial > hg > wordstream
diff wordstream/factory.py @ 3:e21f53582267
adding final dissociation stuff
author | k0s <k0scist@gmail.com> |
---|---|
date | Fri, 12 Feb 2010 01:37:38 -0500 |
parents | 8af3412e907a |
children |
line wrap: on
line diff
--- a/wordstream/factory.py Fri Feb 12 00:38:25 2010 -0500 +++ b/wordstream/factory.py Fri Feb 12 01:37:38 2010 -0500 @@ -1,6 +1,7 @@ import os from dispatcher import Dispatcher +from dispatcher import Scrambler from paste.httpexceptions import HTTPExceptionHandler from paste.urlparser import StaticURLParser from pkg_resources import resource_filename @@ -29,3 +30,11 @@ app = Dispatcher(**args) return HTTPExceptionHandler(PassthroughFileserver(app, resource_filename(__name__, 'static'))) +def dissociate_factory(global_conf, **app_conf): + keystr = 'dissociate.' + args = dict([(key.split(keystr, 1)[-1], value) + for key, value in app_conf.items() + if key.startswith(keystr) ]) + app = Scrambler(**args) + return HTTPExceptionHandler(app) + \ No newline at end of file