class documentation

class WWWInterface(object): (source)

View In Hierarchy

Class to handle the WWW interface for zim notebooks.

Objects of this class are callable, so they can be used as application objects within a WSGI compatible framework. See PEP 333 for details (http://www.python.org/dev/peps/pep-0333/).

For basic handlers to run this interface see the "wsgiref" package in the standard library for python.

Method __call__ Main function for handling a single request. Follows the WSGI API.
Method __init__ No summary
Method render_index Render an index page @param namespace: the namespace Path @returns: html as a list of lines
Method render_page Render a single page from the notebook @param page: a Page object @returns: html as a list of lines
Instance Variable auth_creds Undocumented
Instance Variable dumper_factory Undocumented
Instance Variable linker_factory Undocumented
Instance Variable notebook Undocumented
Instance Variable output Undocumented
Instance Variable template Undocumented
def __call__(self, environ, start_response): (source)
Main function for handling a single request. Follows the WSGI API.
Parameters
environdictionary with environment variables for the request and some special variables. See the PEP for expected variables.
start_response

a function that can be called to set the http response and headers. For example:

        start_response(200, [('Content-Type', 'text/plain')])
Returns
the html page content as a list of lines
def __init__(self, notebook, template='Default', auth_creds=None): (source)
Constructor
Parameters
notebooka Notebook object
templatehtml template for zim pages
auth_credscredentials for HTTP-authentication
def render_index(self, namespace=None): (source)
Render an index page
Parameters
namespacethe namespace Path
Returns
html as a list of lines
def render_page(self, page): (source)
Render a single page from the notebook
Parameters
pagea Page object
Returns
html as a list of lines
auth_creds = (source)

Undocumented

dumper_factory = (source)

Undocumented

linker_factory = (source)

Undocumented

notebook = (source)

Undocumented

output = (source)

Undocumented

template = (source)

Undocumented