pyroxide.view.zpt (version 19 , 2006-12-10 23:18:58 -0800 (Sun, 10 Dec 2006) )
index
/usr/lib/python2.4/site-packages/pyroxide/view/zpt.py

Zope Page Templates module.

 
Modules
       
simpletal.simpleTALES
simpletal.simpleTALUtils

 
Classes
       
ZopePageTemplate

 
class ZopePageTemplate
    A SimpleTAL implementation of Zope Page Templates (ZPT.)
 
  Methods defined here:
__init__(self, viewTemplate, macroTemplate=None, docType='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', allowPythonPath=0)
Initialize the page template.
 
The only required parameter is the viewTemplate which should point to
a valid SimpleTAL template (which could be a as simple as a plain HTML 
file.)
 
The macroTemplate parameter allows the user to create a macro which
acts like a template for the templates.
 
The docType parameter will default to the DOC_TYPE attribute of this
module (basically XHTML 1.1)
 
The allowPythonPath parameter will toggle whether to allow python
statements directly in the template.  It defaults to 0.  Use with 
caution as this could be a security risk.
addToViewContext(self, var, value)
Add a variable and value to the view context.
 
The view context will be used to render the template, replacing all
variables with the values set in the context.
flushTemplate(self, encoding='utf-8', suppressXMLDeclaration=1)
Render the template based on the view context.
 
The return of this function will be the rendered template as a string.
This output is what should be used to set the message body of the
response.

 
Data
        DOC_TYPE = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
__HeadURL__ = '$URL: http://pyroxide.org/svn/pyroxide/trunk/src/main/python/pyroxide/view/zpt.py $'
__Id__ = '$Id: zpt.py 19 2006-12-11 07:18:58Z kevin $'
__LastChangedBy__ = '$Author: kevin $'
__LastChangedDate__ = '$Date: 2006-12-10 23:18:58 -0800 (Sun, 10 Dec 2006) $'
__Revision__ = '$Rev: 19 $'
__author__ = 'Kevin J. Smith (kevin@rootsmith.ca)'
__copyright__ = '(c) 2006 rootsmith Inc.'
__date__ = ' 2006-12-10 23:18:58 -0800 (Sun, 10 Dec 2006) '
__version__ = ' 19 '

 
Author
        Kevin J. Smith (kevin@rootsmith.ca)