class ModuleTemplate(Template):
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 | bytestring_passthrough |
Undocumented |
Instance Variable | callable_ |
Undocumented |
Instance Variable | disable_unicode |
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 .DefTemplate . |
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 .Template with the given context. |
Method | render_unicode |
Render the output of this template as a unicode object. |
Method | _compile_from_file |
Undocumented |
Method | _get_def_callable |
Undocumented |
Method | _setup_cache_args |
Undocumented |
Method | has_def |
Undocumented |
Instance Variable | _code |
Undocumented |
Instance Variable | _source |
Undocumented |
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 .Template . |
Property | last_modified |
Undocumented |
Property | reserved_names |
Undocumented |
Property | source |
Return the template source code for this .Template . |
mako.template.Template.__init__
Undocumented