summaryrefslogtreecommitdiff
path: root/cherrypy/tutorial
diff options
context:
space:
mode:
authorRobert Brewer <fumanchu@aminus.org>2006-08-25 21:25:56 +0000
committerRobert Brewer <fumanchu@aminus.org>2006-08-25 21:25:56 +0000
commita4b0f89d3adff5ce7931d81dc259fed0e9f091f5 (patch)
treefda90c2e4664674aa3d0724beed3b543a824c8ff /cherrypy/tutorial
parent31bfe036ad8ee2d7222c67deb7b2019a878c239c (diff)
downloadcherrypy-git-a4b0f89d3adff5ce7931d81dc259fed0e9f091f5.tar.gz
More (final?) config overhaul work:
1. Removed cherrypy.config.get! Instead, you should directly inspect cherrypy.request, response, server, etc. Note that request.config.get still works fine. 2. a) cherrypy.log is now an instance of LogManager. It's still callable, but now is the object you inspect instead of calling config.get("log*"). b) cherrypy.log_access is now cherrypy.log.access. 3. All threads should now have access to default Request and Response objects, not just the main thread. 4. deadlock.timeout is now request.timeout. 5. Renamed config.py to _cpconfig.py; cherrypy.config is now an instance of _cpconfig.Config. I still need to decide what to do about log_config (removed for now).
Diffstat (limited to 'cherrypy/tutorial')
-rw-r--r--cherrypy/tutorial/tut10_http_errors.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cherrypy/tutorial/tut10_http_errors.py b/cherrypy/tutorial/tut10_http_errors.py
index f6d29cf2..0ae31b89 100644
--- a/cherrypy/tutorial/tut10_http_errors.py
+++ b/cherrypy/tutorial/tut10_http_errors.py
@@ -22,7 +22,7 @@ class HTTPErrorDemo(object):
def index(self):
# display some links that will result in errors
- tracebacks = cherrypy.config.get('request.show_tracebacks')
+ tracebacks = cherrypy.request.show_tracebacks
if tracebacks:
trace = 'off'
else:
@@ -48,7 +48,7 @@ class HTTPErrorDemo(object):
def toggleTracebacks(self):
# simple function to toggle tracebacks on and off
- tracebacks = cherrypy.config.get('request.show_tracebacks')
+ tracebacks = cherrypy.request.show_tracebacks
cherrypy.config.update({'request.show_tracebacks': not tracebacks})
# redirect back to the index