__init__(self,
source,
basedir=None,
filename=None,
loader=None,
encoding=None,
lookup=' lenient ' )
(Constructor)
|
|
Initialize a template from either a string, a file-like object, or
an already parsed markup stream.
- Parameters:
source - a string, file-like object, or markup stream to read the
template from
basedir - the base directory containing the template file; when
loaded from a TemplateLoader, this will be the
directory on the template search path in which the
template was found
filename - the name of the template file, relative to the given
base directory
loader - the TemplateLoader to use for load included templates
encoding - the encoding of the source
lookup - the variable lookup mechanism; either "lenient" (the
default), "strict", or a custom lookup class
- Overrides:
object.__init__
|