diff options
| author | Robert Brewer <fumanchu@aminus.org> | 2006-06-05 04:00:57 +0000 |
|---|---|---|
| committer | Robert Brewer <fumanchu@aminus.org> | 2006-06-05 04:00:57 +0000 |
| commit | 1316bb2de57730a10092d088565d289ce48d8513 (patch) | |
| tree | c4cb8369de240c556cf58fcc84d25e540f5cfc68 /cherrypy/tutorial | |
| parent | e15d3f25b4329371c9793a5ee8047161aa4742a6 (diff) | |
| download | cherrypy-git-1316bb2de57730a10092d088565d289ce48d8513.tar.gz | |
New cherrypy.quickstart function.
Diffstat (limited to 'cherrypy/tutorial')
| -rw-r--r-- | cherrypy/tutorial/tut01_helloworld.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/cherrypy/tutorial/tut01_helloworld.py b/cherrypy/tutorial/tut01_helloworld.py index 704773d2..e79688f4 100644 --- a/cherrypy/tutorial/tut01_helloworld.py +++ b/cherrypy/tutorial/tut01_helloworld.py @@ -21,15 +21,15 @@ class HelloWorld: # publish methods that don't have the exposed attribute set to True. index.exposed = True -# CherryPy always starts with app.root when trying to map request URIs -# to objects, so we need to mount a request handler object here. A request -# to '/' will be mapped to HelloWorld().index(). -cherrypy.tree.mount(HelloWorld()) if __name__ == '__main__': import os.path - # Start the CherryPy server. - cherrypy.config.update(os.path.join(os.path.dirname(__file__), 'tutorial.conf')) - cherrypy.server.start() - cherrypy.engine.start() - + tutconf = os.path.join(os.path.dirname(__file__), 'tutorial.conf') + cherrypy.config.update(tutconf) + # CherryPy always starts with app.root when trying to map request URIs + # to objects, so we need to mount a request handler root. A request + # to '/' will be mapped to HelloWorld().index(). + cherrypy.quickstart(HelloWorld()) +else: + # This branch is for the test suite; you can ignore it. + cherrypy.tree.mount(HelloWorld()) |
