cherrypy.tutorial.tut05_derived_objects module

Tutorial - Object inheritance.

You are free to derive your request handler classes from any base class you wish. In most real-world applications, you will probably want to create a central base class used for all your pages, which takes care of things like printing a common page header and footer.

class cherrypy.tutorial.tut05_derived_objects.AnotherPage[source]

Bases: Page

Another page app.

index()[source]

Produce HTTP response body of another page app index URI.

title = 'Another Page'
class cherrypy.tutorial.tut05_derived_objects.HomePage[source]

Bases: Page

Home page app.

index()[source]

Produce HTTP response body of home page app index URI.

title = 'Tutorial 5'
class cherrypy.tutorial.tut05_derived_objects.Page[source]

Bases: object

Web page base class.

footer()[source]

Render HTML layout footer.

header()[source]

Render HTML layout header.

title = 'Untitled Page'