diff options
| author | Chris McDonough <chrism@plope.com> | 2012-08-29 16:06:40 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-08-29 16:06:40 -0400 |
| commit | a7051f17a6f352193b4f4b7f1bcc635dff452001 (patch) | |
| tree | 33b3a6d6994137b6423f2f4d9ac2dc1a0e3ab717 /docs/narr/helloworld.py | |
| parent | 8b55a68adb54783895a91a9e1af800a7f8f22c07 (diff) | |
| parent | a9289d95036eb23e973815e529d3db3fea235046 (diff) | |
| download | pyramid-a7051f17a6f352193b4f4b7f1bcc635dff452001.tar.gz pyramid-a7051f17a6f352193b4f4b7f1bcc635dff452001.tar.bz2 pyramid-a7051f17a6f352193b4f4b7f1bcc635dff452001.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs/narr/helloworld.py')
| -rw-r--r-- | docs/narr/helloworld.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/docs/narr/helloworld.py b/docs/narr/helloworld.py index 7c26c8cdc..c01329af9 100644 --- a/docs/narr/helloworld.py +++ b/docs/narr/helloworld.py @@ -2,14 +2,15 @@ from wsgiref.simple_server import make_server from pyramid.config import Configurator from pyramid.response import Response + def hello_world(request): - return Response('Hello %(name)s!' % request.matchdict) + return Response('Hello %(name)s!' % request.matchdict) if __name__ == '__main__': - config = Configurator() - config.add_route('hello', '/hello/{name}') - config.add_view(hello_world, route_name='hello') - app = config.make_wsgi_app() - server = make_server('0.0.0.0', 8080, app) - server.serve_forever() + config = Configurator() + config.add_route('hello', '/hello/{name}') + config.add_view(hello_world, route_name='hello') + app = config.make_wsgi_app() + server = make_server('0.0.0.0', 8080, app) + server.serve_forever() |
