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 |
Parameters | |
environ | dictionary 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 |
Parameters | |
notebook | a Notebook object |
template | html template for zim pages |
auth_creds | credentials for HTTP-authentication |