# HG changeset patch # User Jeff Hammel # Date 1330387021 28800 # Node ID 24b8d06eae53d58f51a4930cee55b128b5416ae3 # Parent 93e830409685e1004b11a61232fe9bf2b5538d9f stub out a simple view diff -r 93e830409685 -r 24b8d06eae53 simpypi/factory.py --- a/simpypi/factory.py Mon Feb 27 15:42:12 2012 -0800 +++ b/simpypi/factory.py Mon Feb 27 15:57:01 2012 -0800 @@ -19,13 +19,12 @@ return self.fileserver(environ, start_response) return self.app(environ, start_response) -def factory(global_conf, **app_conf): +def factory(**app_conf): """create a webob view and wrap it in middleware""" + app = Dispatcher(**app_conf) + return HTTPExceptionHandler(PassthroughFileserver(app, resource_filename(__name__, 'static'))) - keystr = 'simpypi.' - args = dict([(key.split(keystr, 1)[-1], value) - for key, value in app_conf.items() - if key.startswith(keystr) ]) - app = Dispatcher(**args) - return HTTPExceptionHandler(PassthroughFileserver(app, resource_filename(__name__, 'static'))) - +if __name__ == '__main__': + import tempfile + from wsgiref import simple_server + app = factory diff -r 93e830409685 -r 24b8d06eae53 simpypi/templates/index.html --- a/simpypi/templates/index.html Mon Feb 27 15:42:12 2012 -0800 +++ b/simpypi/templates/index.html Mon Feb 27 15:57:01 2012 -0800 @@ -1,22 +1,21 @@ - + -Hello world +Python Package Index - - -Hello ${name}! +

Python Package Index

+ Last regenerated: + + +
+ + + +
+