Mercurial > hg > uploader
changeset 3:bb2d34fb5de4
allow to be used as middleware
author | k0s <k0scist@gmail.com> |
---|---|
date | Sun, 27 Dec 2009 16:27:34 -0500 |
parents | 0b5fce452087 |
children | e5efa999911a |
files | setup.py uploader/dispatcher.py |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Sun Dec 27 15:37:51 2009 -0500 +++ b/setup.py Sun Dec 27 16:27:34 2009 -0500 @@ -1,7 +1,7 @@ from setuptools import setup, find_packages import sys, os -version = "0.2" +version = "0.2.1" setup(name='uploader', version=version,
--- a/uploader/dispatcher.py Sun Dec 27 15:37:51 2009 -0500 +++ b/uploader/dispatcher.py Sun Dec 27 16:27:34 2009 -0500 @@ -12,7 +12,8 @@ defaults = { 'directory': None, 'auth': 'False', 'query_string': None, - 'subpath': 'False' } + 'subpath': 'False', + 'app': None} def __init__(self, **kw): for key in self.defaults: @@ -38,6 +39,8 @@ handler = h(self, request) break else: + if self.app: + return self.app(environ, start_response) handler = exc.HTTPNotFound res = handler() return res(environ, start_response)