summaryrefslogtreecommitdiff
path: root/cherrypy/tutorial
diff options
context:
space:
mode:
authorRemi Delon <rdelon@cherrypy.org>2005-12-03 18:44:11 +0000
committerRemi Delon <rdelon@cherrypy.org>2005-12-03 18:44:11 +0000
commitaaf39882e0b581afe6e0729a92935c341c64accd (patch)
tree79e5f4902853b33aa344aa8164fff6ac98143086 /cherrypy/tutorial
parent66f2692af446cbbfb32de0fb1839a3522c6932df (diff)
downloadcherrypy-git-aaf39882e0b581afe6e0729a92935c341c64accd.tar.gz
Big change: camelCase to lower_with_underscore names (still need to update the book)
Diffstat (limited to 'cherrypy/tutorial')
-rw-r--r--cherrypy/tutorial/tut07_sessions.py2
-rw-r--r--cherrypy/tutorial/tut10_http_errors.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/cherrypy/tutorial/tut07_sessions.py b/cherrypy/tutorial/tut07_sessions.py
index 609e2656..9838d55b 100644
--- a/cherrypy/tutorial/tut07_sessions.py
+++ b/cherrypy/tutorial/tut07_sessions.py
@@ -28,7 +28,7 @@ class HitCounter:
cherrypy.root = HitCounter()
-cherrypy.config.update({'sessionFilter.on': True})
+cherrypy.config.update({'session_filter.on': True})
if __name__ == '__main__':
cherrypy.config.update(file = 'tutorial.conf')
diff --git a/cherrypy/tutorial/tut10_http_errors.py b/cherrypy/tutorial/tut10_http_errors.py
index df276438..209038f7 100644
--- a/cherrypy/tutorial/tut10_http_errors.py
+++ b/cherrypy/tutorial/tut10_http_errors.py
@@ -15,7 +15,7 @@ class HTTPErrorDemo(object):
def index(self):
# display some links that will result in errors
- tracebacks = cherrypy.config.get('server.showTracebacks')
+ tracebacks = cherrypy.config.get('server.show_tracebacks')
if tracebacks:
trace = 'off'
else:
@@ -41,8 +41,8 @@ class HTTPErrorDemo(object):
def toggleTracebacks(self):
# simple function to toggle tracebacks on and off
- tracebacks = cherrypy.config.get('server.showTracebacks')
- cherrypy.config.update({'server.showTracebacks': not tracebacks})
+ tracebacks = cherrypy.config.get('server.show_tracebacks')
+ cherrypy.config.update({'server.show_tracebacks': not tracebacks})
# redirect back to the index
raise cherrypy.HTTPRedirect('/')
@@ -67,7 +67,7 @@ cherrypy.root = HTTPErrorDemo()
import os
localDir = os.path.dirname(__file__)
curpath = os.path.normpath(os.path.join(os.getcwd(), localDir))
-cherrypy.config.update({'errorPage.403' : os.path.join(curpath, "custom_error.html")})
+cherrypy.config.update({'error_page.403' : os.path.join(curpath, "custom_error.html")})
if __name__ == '__main__':