1 """Demonstration app for cherrypy.checker.
2
3 This application is intentionally broken and badly designed.
4 To demonstrate the output of the CherryPy Checker, simply execute
5 this module.
6 """
7
8 import os
9 import cherrypy
10 thisdir = os.path.dirname(os.path.abspath(__file__))
11
12
15
16 if __name__ == '__main__':
17 conf = {'/base': {'tools.staticdir.root': thisdir,
18
19 'throw_errors': True,
20 },
21
22 '/base/static': {'tools.staticdir.on': True,
23 'tools.staticdir.dir': 'static'},
24
25 '/base/js': {'tools.staticdir.on': True,
26 'tools.staticdir.dir': 'js'},
27
28 '/base/static2': {'tools.staticdir.on': True,
29 'tools.staticdir.dir': '/static'},
30
31 '/static3': {'tools.staticdir.on': True,
32 'tools.staticdir.dir': 'static'},
33
34 '/unknown': {'toobles.gzip.on': True},
35
36 '/cpknown': {'cherrypy.tools.encode.on': True},
37
38 '/conftype': {'request.show_tracebacks': 14},
39
40 '/web': {'tools.unknown.on': True},
41
42 '/app1': {'server.socket_host': '0.0.0.0'},
43
44 'global': {'server.socket_host': 'localhost'},
45
46 '[/extra_brackets]': {},
47 }
48 cherrypy.quickstart(Root(), config=conf)
49