diff options
| author | Chris McDonough <chrism@plope.com> | 2012-01-10 14:45:12 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2012-01-10 14:45:12 -0500 |
| commit | 26484029f9d4d591e9541547f6d5e381ce3a0be2 (patch) | |
| tree | aba3132e660b320a6734adb0d93a3b6bbdcf5877 /docs/narr/configuration.rst | |
| parent | a21278872884809cfec7d5de8c64518c404f2b02 (diff) | |
| parent | cf3a11e990adda800e284effb006f1c28335da4d (diff) | |
| download | pyramid-26484029f9d4d591e9541547f6d5e381ce3a0be2.tar.gz pyramid-26484029f9d4d591e9541547f6d5e381ce3a0be2.tar.bz2 pyramid-26484029f9d4d591e9541547f6d5e381ce3a0be2.zip | |
Merge branch '1.3-branch'
Diffstat (limited to 'docs/narr/configuration.rst')
| -rw-r--r-- | docs/narr/configuration.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/docs/narr/configuration.rst b/docs/narr/configuration.rst index 597d48b09..cd3dab099 100644 --- a/docs/narr/configuration.rst +++ b/docs/narr/configuration.rst @@ -36,7 +36,7 @@ applications, configured imperatively: .. code-block:: python :linenos: - from paste.httpserver import serve + from wsgiref.simple_server import make_server from pyramid.config import Configurator from pyramid.response import Response @@ -47,7 +47,8 @@ applications, configured imperatively: config = Configurator() config.add_view(hello_world) app = config.make_wsgi_app() - serve(app, host='0.0.0.0') + server = make_server('0.0.0.0', 8080, app) + server.serve_forever() We won't talk much about what this application does yet. Just note that the "configuration' statements take place underneath the ``if __name__ == @@ -105,7 +106,8 @@ in a package and its subpackages. For example: .. code-block:: python :linenos: - from paste.httpserver import serve + from wsgiref.simple_server import make_server + from pyramid.config import Configurator from pyramid.response import Response from pyramid.view import view_config @@ -118,7 +120,8 @@ in a package and its subpackages. For example: config = Configurator() config.scan() app = config.make_wsgi_app() - serve(app, host='0.0.0.0') + server = make_server('0.0.0.0', 8080, app) + server.serve_forever() The scanning machinery imports each module and subpackage in a package or module recursively, looking for special attributes attached to objects |
