|
Revision 1544
(checked in by fumanchu, 2 years ago)
|
More checker checks (plus a fix for the fix for the fix).
|
- Property svn:eol-style set to
native
|
| Line | |
|---|
| 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 |
class Root: |
|---|
| 13 |
pass |
|---|
| 14 |
|
|---|
| 15 |
if __name__ == '__main__': |
|---|
| 16 |
conf = {'/base': {'tools.staticdir.root': thisdir, |
|---|
| 17 |
|
|---|
| 18 |
'throw_errors': True, |
|---|
| 19 |
}, |
|---|
| 20 |
|
|---|
| 21 |
'/base/static': {'tools.staticdir.on': True, |
|---|
| 22 |
'tools.staticdir.dir': 'static'}, |
|---|
| 23 |
|
|---|
| 24 |
'/base/js': {'tools.staticdir.on': True, |
|---|
| 25 |
'tools.staticdir.dir': 'js'}, |
|---|
| 26 |
|
|---|
| 27 |
'/base/static2': {'tools.staticdir.on': True, |
|---|
| 28 |
'tools.staticdir.dir': '/static'}, |
|---|
| 29 |
|
|---|
| 30 |
'/static3': {'tools.staticdir.on': True, |
|---|
| 31 |
'tools.staticdir.dir': 'static'}, |
|---|
| 32 |
|
|---|
| 33 |
'/unknown': {'toobles.gzip.on': True}, |
|---|
| 34 |
|
|---|
| 35 |
'/cpknown': {'cherrypy.tools.encode.on': True}, |
|---|
| 36 |
} |
|---|
| 37 |
cherrypy.quickstart(Root(), config=conf) |
|---|