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
10
12
14
15 return 'We have an <a href="show_msg">important message</a> for you!'
16 index.exposed = True
17
19
20 return "Hello world!"
21 show_msg.exposed = True
22
23 import os.path
24 tutconf = os.path.join(os.path.dirname(__file__), 'tutorial.conf')
25
26 if __name__ == '__main__':
27
28
29
30 cherrypy.quickstart(HelloWorld(), config=tutconf)
31 else:
32
33 cherrypy.tree.mount(HelloWorld(), config=tutconf)
34