]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Undo documentation changes from the introduction of Application.listen().
authorBen Darnell <ben@bendarnell.com>
Thu, 10 Feb 2011 01:01:53 +0000 (17:01 -0800)
committerBen Darnell <ben@bendarnell.com>
Thu, 10 Feb 2011 01:01:53 +0000 (17:01 -0800)
The examples given do not work in the 1.1.1 release.  This change should be
reverted when 1.2 is released and the new examples work.

website/templates/documentation.txt
website/templates/index.html

index b1a903a39a1807dbc3e4dd4f7e70c8f46dfcf6c2..09b928e5740e8519d6e058f0d11184604528f04a 100644 (file)
@@ -23,6 +23,7 @@ thousands of clients, see
 
 Here is the canonical "Hello, world" example app:
 
+    import tornado.httpserver
     import tornado.ioloop
     import tornado.web
 
@@ -35,7 +36,8 @@ Here is the canonical "Hello, world" example app:
     ])
 
     if __name__ == "__main__":
-        application.listen(8888)
+        http_server = tornado.httpserver.HTTPServer(application)
+        http_server.listen(8888)
         tornado.ioloop.IOLoop.instance().start()
 
 See [Tornado walkthrough](#tornado-walkthrough) below for a detailed
index a409dade2386471859e072aacbde2d6045b9ed9d..359e9e2e28cc3d4c7aff784b3d970afda3ce0f79 100644 (file)
@@ -26,7 +26,8 @@ sudo python setup.py install</code></pre>
 
   <h2>Hello, world</h2>
   <p>Here is the canonical &quot;Hello, world&quot; example app for Tornado:</p>
-  <pre><code>import tornado.ioloop
+  <pre><code>import tornado.httpserver
+import tornado.ioloop
 import tornado.web
 
 class MainHandler(tornado.web.RequestHandler):
@@ -38,7 +39,8 @@ application = tornado.web.Application([
 ])
 
 if __name__ == "__main__":
-    application.listen(8888)
+    http_server = tornado.httpserver.HTTPServer(application)
+    http_server.listen(8888)
     tornado.ioloop.IOLoop.instance().start()</code></pre>
   <p>See the <a href="/documentation">Tornado documentation</a> for a detailed walkthrough of the framework.</p>