web.web.template.Template

Package web :: Package web :: Module template :: Class Template |
[hide private]
[frames] | no frames]

# Class Template

source code

    BaseTemplate --+
                   |
                  Template

Known Subclasses:
  - CompiledTemplate

Instance Methods | [hide private]
__init__(self, text, filename=`'``<template>``'`, filter=None, globals=None, builtins=None, extensions=None) | source code
__call__(self, *a, **kw) | source code
create_parser(self) | source code
compile_template(self, template_string, filename) | source code
Inherited from `BaseTemplate`: `make_env` Inherited from `BaseTemplate` (private): `_compile`, `_escape`, `_join`

Static Methods | [hide private]
normalize_text(text) Normalizes template text by correcting , tabs and BOM chars. | source code
generate_code(text, filename, parser=None) | source code

Class Variables | [hide private]
| CONTENT_TYPES = ``{``'``.html``'``:` `'``text/html; charset=utf-8``'``,` `'``.txt``'``:` `...``
| FILTERS = `{'.html': websafe, '.xhtml': websafe, '.xml': websafe}`
| globals = ``{``}``

Instance Variables | [hide private]
Inherited from `BaseTemplate`: `t`

Method Details | [hide private]

### __init__(self, text, filename=`'``<template>``'`, filter=None, globals=None, builtins=None, extensions=None) (Constructor) | source code
Overrides: BaseTemplate.__init__

### __call__(self, *a, **kw) (Call operator) | source code
Overrides: BaseTemplate.__call__

Class Variable Details | [hide private]

  ### CONTENT_TYPES Value:
      {'.html': 'text/html; charset=utf-8',
       '.txt': 'text/plain',
       '.xhtml': 'application/xhtml+xml; charset=utf-8'}