summaryrefslogtreecommitdiff
path: root/docs/designdefense.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-12-16 04:54:09 -0500
committerChris McDonough <chrism@plope.com>2011-12-16 04:54:09 -0500
commit10f1b5c35072c5499f3504dc261fb3c67a90c70d (patch)
tree65d844890e4333109b92cfeb91c11d639ae43f07 /docs/designdefense.rst
parent9003a8bba654f98933b98dacac67760cff73e1c5 (diff)
downloadpyramid-10f1b5c35072c5499f3504dc261fb3c67a90c70d.tar.gz
pyramid-10f1b5c35072c5499f3504dc261fb3c67a90c70d.tar.bz2
pyramid-10f1b5c35072c5499f3504dc261fb3c67a90c70d.zip
stamp out paste.httpserver usage
Diffstat (limited to 'docs/designdefense.rst')
-rw-r--r--docs/designdefense.rst12
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/designdefense.rst b/docs/designdefense.rst
index 80675ce83..59b0e5a2d 100644
--- a/docs/designdefense.rst
+++ b/docs/designdefense.rst
@@ -1628,8 +1628,8 @@ comments take into account what we've discussed in the
.. code-block:: python
:linenos:
- from pyramid.response import Response # explicit response objects, no TL
- from paste.httpserver import serve # explicitly WSGI
+ from pyramid.response import Response # explicit response, no TL
+ from wsgiref.simple_server import make_server # explicitly WSGI
def hello_world(request): # accepts a request; no request thread local reqd
# explicit response object means no response threadlocal
@@ -1640,7 +1640,8 @@ comments take into account what we've discussed in the
config = Configurator() # no global application object.
config.add_view(hello_world) # explicit non-decorator registration
app = config.make_wsgi_app() # explicitly WSGI
- serve(app, host='0.0.0.0') # explicitly WSGI
+ server = make_server('0.0.0.0', 8080, app)
+ server.serve_forever() # explicitly WSGI
Pyramid Doesn't Offer Pluggable Apps
------------------------------------
@@ -1736,7 +1737,7 @@ If you can understand this hello world program, you can use Pyramid:
.. 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
@@ -1747,7 +1748,8 @@ If you can understand this hello world program, you can use Pyramid:
config = Configurator()
config.add_view(hello_world)
app = config.make_wsgi_app()
- serve(app)
+ server = make_server('0.0.0.0', 8080, app)
+ server.serve_forever()
Pyramid has ~ 650 pages of documentation (printed), covering topics from the
very basic to the most advanced. *Nothing* is left undocumented, quite