Mercurial > genshi > genshi-test
changeset 354:7ae694e7462e
Remove unused code from text template plugin.
author | cmlenz |
---|---|
date | Mon, 13 Nov 2006 10:40:22 +0000 |
parents | b0278e5c8806 |
children | c5684b65c9b7 |
files | doc/text-templates.txt doc/xml-templates.txt genshi/template/plugin.py |
diffstat | 3 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/text-templates.txt +++ b/doc/text-templates.txt @@ -116,7 +116,8 @@ Template Directives ------------------- -Directives are lines starting with a ``#`` character followed immediately by the directive name. They can affect how the template is rendered in a number of +Directives are lines starting with a ``#`` character followed immediately by +the directive name. They can affect how the template is rendered in a number of ways: Genshi provides directives for conditionals and looping, among others. Directives must be on separate lines, and the ``#`` character must be be the
--- a/doc/xml-templates.txt +++ b/doc/xml-templates.txt @@ -104,7 +104,7 @@ You **will** however get a ``NameError`` if you try to call an undefined variable, or do anything else with it, such as accessing its attributes. If you need to know whether a variable is defined, you can check its type against the -``Undefined`` class, for example in an `py:if`_ directive:: +``Undefined`` class, for example in a `py:if`_ directive:: >>> from genshi.template import TextTemplate >>> tmpl = TextTemplate('${type(doh) is Undefined}')
--- a/genshi/template/plugin.py +++ b/genshi/template/plugin.py @@ -152,11 +152,3 @@ template_class = TextTemplate extension = '.txt' default_format = 'text' - - def transform(self, info, template): - """Render the output to an event stream.""" - data = {} - if self.get_extra_vars: - data.update(self.get_extra_vars()) - data.update(info) - return super(TextTemplateEnginePlugin, self).transform(data, template)