summaryrefslogtreecommitdiff
path: root/docs/narr/helloworld.py
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2012-08-23 09:57:22 -0500
committerMichael Merickel <michael@merickel.org>2012-08-23 09:57:22 -0500
commite7c4adcdd74efa5da7700e5f122c58ff17befe0f (patch)
treec7a337f2716372a55183d321ac6c21c6244cc680 /docs/narr/helloworld.py
parente8c5618aeb8c0948bbea68e000e771d23c610d40 (diff)
parenta0243a5264371a3e69fd188cee17c6fbfd8341a8 (diff)
downloadpyramid-e7c4adcdd74efa5da7700e5f122c58ff17befe0f.tar.gz
pyramid-e7c4adcdd74efa5da7700e5f122c58ff17befe0f.tar.bz2
pyramid-e7c4adcdd74efa5da7700e5f122c58ff17befe0f.zip
Merge branch 'master' of https://github.com/virhilo/pyramid into pull.650
Diffstat (limited to 'docs/narr/helloworld.py')
-rw-r--r--docs/narr/helloworld.py15
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()