diff options
| author | Michael Merickel <michael@merickel.org> | 2017-04-30 02:02:26 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@merickel.org> | 2017-04-30 02:02:26 -0500 |
| commit | 9c15a8eac2848cc7a81f174ecf7a6c63be323f51 (patch) | |
| tree | abf20accdb77f6127a5480bf023231c7b0b6706b /README.rst | |
| parent | 3f14d63c009ae7f101b7aeb4525bab2dfe66fa11 (diff) | |
| parent | 87af11c5e33b8c03d57a8b571f0b152efe866af1 (diff) | |
| download | pyramid-9c15a8eac2848cc7a81f174ecf7a6c63be323f51.tar.gz pyramid-9c15a8eac2848cc7a81f174ecf7a6c63be323f51.tar.bz2 pyramid-9c15a8eac2848cc7a81f174ecf7a6c63be323f51.zip | |
Merge branch 'master' into pr/2854
Diffstat (limited to 'README.rst')
| -rw-r--r-- | README.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/README.rst b/README.rst index f05dd8bbf..302590fe1 100644 --- a/README.rst +++ b/README.rst @@ -31,10 +31,10 @@ and deployment more fun, more predictable, and more productive. 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() + with Configurator() as config: + 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() |
