1 """
2 Tutorial - Multiple methods
3
4 This tutorial shows you how to link to other methods of your request
5 handler.
6 """
7
8 import cherrypy
9
11
13
14 return 'We have an <a href="showMessage">important message</a> for you!'
15 index.exposed = True
16
18
19 return "Hello world!"
20 showMessage.exposed = True
21
22 import os.path
23 tutconf = os.path.join(os.path.dirname(__file__), 'tutorial.conf')
24
25 if __name__ == '__main__':
26
27
28
29 cherrypy.quickstart(HelloWorld(), config=tutconf)
30 else:
31
32 cherrypy.tree.mount(HelloWorld(), config=tutconf)
33