summaryrefslogtreecommitdiff
path: root/docs/narr/helloworld.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-08-23 12:33:54 -0400
committerChris McDonough <chrism@plope.com>2012-08-23 12:33:54 -0400
commit0d9dccd259d52be9be2400cfe6ee5b709b812bfc (patch)
treeddb6d0174bab3a49c19e9f678c1c7ce4a43c5a8f /docs/narr/helloworld.py
parentb9b4657e79e7e1ed1f0c79bf82c3fe19a0ab5687 (diff)
parent75a8ff4ad0ba8eed13592eb5e7a211da3035e209 (diff)
downloadpyramid-0d9dccd259d52be9be2400cfe6ee5b709b812bfc.tar.gz
pyramid-0d9dccd259d52be9be2400cfe6ee5b709b812bfc.tar.bz2
pyramid-0d9dccd259d52be9be2400cfe6ee5b709b812bfc.zip
Merge branch 'master' of github.com:Pylons/pyramid
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()