| Name | Size | Mode | Actions |
|---|---|---|---|
| __pycache__/ | - | 0755 | rm |
| custom_error.html | 404 | 0644 | editdlrm |
| pdf_file.pdf | 85698 | 0644 | editdlrm |
| README.rst | 617 | 0644 | editdlrm |
| tut01_helloworld.py | 1015 | 0644 | editdlrm |
| tut02_expose_methods.py | 801 | 0644 | editdlrm |
| tut03_get_and_post.py | 1587 | 0644 | editdlrm |
| tut04_complex_site.py | 2948 | 0644 | editdlrm |
| tut05_derived_objects.py | 2141 | 0644 | editdlrm |
| tut06_default_method.py | 2264 | 0644 | editdlrm |
| tut07_sessions.py | 1228 | 0644 | editdlrm |
| tut08_generators_and_yield.py | 1288 | 0644 | editdlrm |
| tut09_files.py | 3463 | 0644 | editdlrm |
| tut10_http_errors.py | 2706 | 0644 | editdlrm |
| tutorial.conf | 96 | 0644 | editdlrm |
| __init__.py | 85 | 0644 | editdlrm |
/opt/imh-python/lib/python3.9/site-packages/cherrypy/tutorial/tut05_derived_objects.py (2141B)
Isn't this exciting? There's another page, too!
''' + self.footer() class AnotherPage(Page): title = 'Another Page' @cherrypy.expose def index(self): return self.header() + '''And this is the amazing second page!
''' + self.footer() tutconf = os.path.join(os.path.dirname(__file__), 'tutorial.conf') if __name__ == '__main__': # CherryPy always starts with app.root when trying to map request URIs # to objects, so we need to mount a request handler root. A request # to '/' will be mapped to HelloWorld().index(). cherrypy.quickstart(HomePage(), config=tutconf)