summaryrefslogtreecommitdiff
path: root/docs/narr/helloworld.py
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-08-25 02:23:51 -0400
committerChris McDonough <chrism@plope.com>2011-08-25 02:23:51 -0400
commitd73be153fa9544f453510524f34d55a7602e0896 (patch)
tree32353078e9b85cf43c92a65c530fbf35d36ef59b /docs/narr/helloworld.py
parentf7fe1d3b9b98663febad51bd6c09b5a7f7ea3e1f (diff)
downloadpyramid-d73be153fa9544f453510524f34d55a7602e0896.tar.gz
pyramid-d73be153fa9544f453510524f34d55a7602e0896.tar.bz2
pyramid-d73be153fa9544f453510524f34d55a7602e0896.zip
use Response; fix text
Diffstat (limited to 'docs/narr/helloworld.py')
-rw-r--r--docs/narr/helloworld.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/narr/helloworld.py b/docs/narr/helloworld.py
index ce0fcf955..92e16efbb 100644
--- a/docs/narr/helloworld.py
+++ b/docs/narr/helloworld.py
@@ -1,12 +1,13 @@
from paste.httpserver import serve
from pyramid.configuration import Configurator
+from pyramid.response import Response
def hello_world(request):
- return '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', renderer='string')
+ config.add_view(hello_world, route_name='hello')
app = config.make_wsgi_app()
- serve(app, host='0.0.0.0') \ No newline at end of file
+ serve(app, host='0.0.0.0')