Page Templates using TAL, TALES, and METAL.
Subclassing -----------
The following methods have certain internal responsibilities.
pt_getContext(**keywords) Should ignore keyword arguments that it doesn't care about, and construct the namespace passed to the TALES expression engine. This method is free to use the keyword arguments it receives.
pt_render(namespace, source=False, sourceAnnotations=False, showtal=False) Responsible the TAL interpreter to perform the rendering. The namespace argument is a mapping which defines the top-level namespaces passed to the TALES expression engine.
__call__(args, *keywords) Calls pt_getContext() to construct the top-level namespace passed to the TALES expression engine, then calls pt_render() to perform the rendering.
content_type
(type:
str
)
'text/html'
expand
(type:
int
)
1
macros
(type:
property
)
<property object at 0x40d52194>
pt_edit(text, content_type)
pt_errors(namespace)
pt_getContext(args=(), options={}, **ignored)
pt_getEngine()
pt_getEngineContext(namespace)
pt_render(namespace, source=False, sourceAnnotations=False, showtal=False)
Render this Page Template
pt_source_file()
To be overridden.
read(request=None)
Gets the source, sometimes with macros expanded.
write(text)