diff options
| author | Robert Brewer <fumanchu@aminus.org> | 2006-05-04 07:44:59 +0000 |
|---|---|---|
| committer | Robert Brewer <fumanchu@aminus.org> | 2006-05-04 07:44:59 +0000 |
| commit | 001f3929036def5a11f114d99e1ce21772278f36 (patch) | |
| tree | a6fcd0966a8b2f5efb9ca0113c407a5ea1d521f2 /cherrypy/tutorial | |
| parent | a3ee2c7add299e1ce732c8f7ec13bfe315c5a54a (diff) | |
| download | cherrypy-git-001f3929036def5a11f114d99e1ce21772278f36.tar.gz | |
Separated cherrypy.server (HTTP) from cherrypy.engine (app):
1. Most CP apps must now make both a call to cherrypy.server.start(server=None) and a call to cherrypy.engine.start(blocking=True).
2. The on_start_server_list and on_stop_server_list are now on_start_engine_list and on_stop_engine_list.
3. "start_with_callback" is now an attribute of Engine. So is "request".
4. Server.start now takes a single "server" arg, which can be a server instance, a string (fully qualified class name), or None (to start the default WSGI server).
5. Server still has a wait method, but otherwise does no blocking.
Diffstat (limited to 'cherrypy/tutorial')
| -rw-r--r-- | cherrypy/tutorial/bonus-sqlobject.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut01_helloworld.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut02_expose_methods.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut03_get_and_post.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut04_complex_site.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut05_derived_objects.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut06_default_method.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut07_sessions.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut08_generators_and_yield.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut09_files.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tut10_http_errors.py | 1 | ||||
| -rw-r--r-- | cherrypy/tutorial/tutorial.conf | 4 |
12 files changed, 13 insertions, 2 deletions
diff --git a/cherrypy/tutorial/bonus-sqlobject.py b/cherrypy/tutorial/bonus-sqlobject.py index 3a384b61..3bf32e2b 100644 --- a/cherrypy/tutorial/bonus-sqlobject.py +++ b/cherrypy/tutorial/bonus-sqlobject.py @@ -167,3 +167,4 @@ print "If you're running this application for the first time, please go to http: cherrypy.root = ContactManager() cherrypy.server.start() +cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut01_helloworld.py b/cherrypy/tutorial/tut01_helloworld.py index 7694f470..63cdf9dd 100644 --- a/cherrypy/tutorial/tut01_helloworld.py +++ b/cherrypy/tutorial/tut01_helloworld.py @@ -31,4 +31,5 @@ if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') # Start the CherryPy server. cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut02_expose_methods.py b/cherrypy/tutorial/tut02_expose_methods.py index 25a763eb..d4418d4f 100644 --- a/cherrypy/tutorial/tut02_expose_methods.py +++ b/cherrypy/tutorial/tut02_expose_methods.py @@ -24,4 +24,5 @@ cherrypy.root = HelloWorld() if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut03_get_and_post.py b/cherrypy/tutorial/tut03_get_and_post.py index 72d9b196..699db47f 100644 --- a/cherrypy/tutorial/tut03_get_and_post.py +++ b/cherrypy/tutorial/tut03_get_and_post.py @@ -46,3 +46,4 @@ cherrypy.root = WelcomePage() if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut04_complex_site.py b/cherrypy/tutorial/tut04_complex_site.py index 9df48d9c..076c484e 100644 --- a/cherrypy/tutorial/tut04_complex_site.py +++ b/cherrypy/tutorial/tut04_complex_site.py @@ -87,4 +87,5 @@ cherrypy.root.links = LinksPage() if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut05_derived_objects.py b/cherrypy/tutorial/tut05_derived_objects.py index 8803bc06..d7789efd 100644 --- a/cherrypy/tutorial/tut05_derived_objects.py +++ b/cherrypy/tutorial/tut05_derived_objects.py @@ -75,4 +75,5 @@ cherrypy.root = HomePage() if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut06_default_method.py b/cherrypy/tutorial/tut06_default_method.py index f43747d8..bf7018a6 100644 --- a/cherrypy/tutorial/tut06_default_method.py +++ b/cherrypy/tutorial/tut06_default_method.py @@ -56,4 +56,5 @@ cherrypy.root = UsersPage() if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut07_sessions.py b/cherrypy/tutorial/tut07_sessions.py index f9a0ce37..1fb73721 100644 --- a/cherrypy/tutorial/tut07_sessions.py +++ b/cherrypy/tutorial/tut07_sessions.py @@ -33,4 +33,5 @@ cherrypy.config.update({'tools.sessions.on': True}) if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut08_generators_and_yield.py b/cherrypy/tutorial/tut08_generators_and_yield.py index 3f4443d5..6a9f5b46 100644 --- a/cherrypy/tutorial/tut08_generators_and_yield.py +++ b/cherrypy/tutorial/tut08_generators_and_yield.py @@ -38,4 +38,5 @@ cherrypy.root = GeneratorDemo() if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut09_files.py b/cherrypy/tutorial/tut09_files.py index d241ce4f..5ecc8839 100644 --- a/cherrypy/tutorial/tut09_files.py +++ b/cherrypy/tutorial/tut09_files.py @@ -98,3 +98,4 @@ if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') # Start the CherryPy server. cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tut10_http_errors.py b/cherrypy/tutorial/tut10_http_errors.py index 209038f7..c0fe4be2 100644 --- a/cherrypy/tutorial/tut10_http_errors.py +++ b/cherrypy/tutorial/tut10_http_errors.py @@ -75,3 +75,4 @@ if __name__ == '__main__': cherrypy.config.update(file = 'tutorial.conf') # Start the CherryPy server. cherrypy.server.start() + cherrypy.engine.start() diff --git a/cherrypy/tutorial/tutorial.conf b/cherrypy/tutorial/tutorial.conf index b0217a88..b0ddd494 100644 --- a/cherrypy/tutorial/tutorial.conf +++ b/cherrypy/tutorial/tutorial.conf @@ -2,5 +2,5 @@ server.socket_port = 8080
server.thread_pool = 10
server.environment = "production"
-# server.showTracebacks = True
-# server.logToScreen = False
+# server.show_tracebacks = True
+server.log_to_screen = True
|
