class documentation

class ModuleTemplate(Template): (source)

View In Hierarchy

A Template which is constructed given an existing Python module. e.g.:: t = Template("this is a template") f = file("mymodule.py", "w") f.write(t.code) f.close() import mymodule t = ModuleTemplate(mymodule) print(t.render())

Method __init__ Undocumented
Instance Variable callable_ Undocumented
Instance Variable enable_loop Undocumented
Instance Variable encoding_errors Undocumented
Instance Variable error_handler Undocumented
Instance Variable filename Undocumented
Instance Variable format_exceptions Undocumented
Instance Variable include_error_handler Undocumented
Instance Variable input_encoding Undocumented
Instance Variable lookup Undocumented
Instance Variable module Undocumented
Instance Variable module_id Undocumented
Instance Variable output_encoding Undocumented
Instance Variable uri Undocumented

Inherited from Template:

Method get_def Return a def of this template as a :class:`.DefTemplate`.
Method has_def Undocumented
Method list_defs return a list of defs in the template.
Method render Render the output of this template as a string.
Method render_context Render this :class:`.Template` with the given context.
Method render_unicode Render the output of this template as a unicode object.
Instance Variable buffer_filters Undocumented
Instance Variable cache_args Undocumented
Instance Variable cache_enabled Undocumented
Instance Variable cache_impl Undocumented
Instance Variable default_filters Undocumented
Instance Variable future_imports Undocumented
Instance Variable imports Undocumented
Instance Variable lexer_cls Undocumented
Instance Variable module_directory Undocumented
Instance Variable module_writer Undocumented
Instance Variable preprocessor Undocumented
Instance Variable strict_undefined Undocumented
Property cache Undocumented
Property cache_dir Undocumented
Property cache_type Undocumented
Property cache_url Undocumented
Property code Return the module source code for this :class:`.Template`.
Property last_modified Undocumented
Property reserved_names Undocumented
Property source Return the template source code for this :class:`.Template`.
Method _compile_from_file Undocumented
Method _get_def_callable Undocumented
Method _setup_cache_args Undocumented
Instance Variable _code Undocumented
Instance Variable _source Undocumented
def __init__(self, module, module_filename=None, template=None, template_filename=None, module_source=None, template_source=None, output_encoding=None, encoding_errors='strict', format_exceptions=False, error_handler=None, lookup=None, cache_args=None, cache_impl='beaker', cache_enabled=True, cache_type=None, cache_dir=None, cache_url=None, include_error_handler=None): (source)

Undocumented

callable_ = (source)

Undocumented

enable_loop = (source)

Undocumented

encoding_errors = (source)
error_handler = (source)

Undocumented

filename = (source)

Undocumented

format_exceptions = (source)
include_error_handler = (source)
input_encoding = (source)

Undocumented

Undocumented

Undocumented

module_id = (source)

Undocumented

output_encoding = (source)