The Publisher is the central object that manages the normal
traversal, page generation, and error handling pattern used in QP,
as well as in Gizmo. There is one Publisher instance per web
application process, and it can be accessed from anywhere and
at anytime via a call to common.get_publisher().

Most of the useful objects for handling the current request, are
conveniently collected in a Hit instance, that
can be accessed at any time via get_publisher().get_hit():

  • hit.get_request()
  • hit.get_response()
  • hit.get_session()

Pages are typically implemented as exported methods on a
Gizmo(QP) Directory.
Notice — in the python source below for this directory,
i.e. for all pages below /basics/ — the list of
exports and the child menu items for this index page.
Exports with a crumb of None are not included in the menu.

click to expand
Python source : gizmo(qp) directory, /basics/

The /basics/ directory is
set-up such that the content sub-template for each page is extracted from a
single file, as delineated by markers such as
%(begin.index)s and %(begin.end)s
(see Skins).

click to expand
Template source : single content template, all pages below /basics/ basics.html