summaryrefslogtreecommitdiff
path: root/docs/designdefense.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-01-10 14:45:12 -0500
committerChris McDonough <chrism@plope.com>2012-01-10 14:45:12 -0500
commit26484029f9d4d591e9541547f6d5e381ce3a0be2 (patch)
treeaba3132e660b320a6734adb0d93a3b6bbdcf5877 /docs/designdefense.rst
parenta21278872884809cfec7d5de8c64518c404f2b02 (diff)
parentcf3a11e990adda800e284effb006f1c28335da4d (diff)
downloadpyramid-26484029f9d4d591e9541547f6d5e381ce3a0be2.tar.gz
pyramid-26484029f9d4d591e9541547f6d5e381ce3a0be2.tar.bz2
pyramid-26484029f9d4d591e9541547f6d5e381ce3a0be2.zip
Merge branch '1.3-branch'
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