Mercurial > genshi > mirror
diff genshi/filters.py @ 439:9f11c745fac9 trunk
Add support for adding custom template filters by passing a custom callback function to the `TemplateLoader`. Closes #89 (see added unit test).
author | cmlenz |
---|---|
date | Mon, 02 Apr 2007 19:43:31 +0000 |
parents | ad01564e87f2 |
children |
line wrap: on
line diff
--- a/genshi/filters.py +++ b/genshi/filters.py @@ -62,11 +62,10 @@ data = {} self.data = data - def __call__(self, stream, ctxt=None): + def __call__(self, stream): """Apply the filter to the given stream. :param stream: the markup event stream to filter - :param ctxt: the template context (unused) """ in_form = in_select = in_option = in_textarea = False select_value = option_value = textarea_value = None @@ -251,11 +250,10 @@ self.uri_attrs = uri_attrs self.safe_schemes = safe_schemes - def __call__(self, stream, ctxt=None): + def __call__(self, stream): """Apply the filter to the given stream. :param stream: the markup event stream to filter - :param ctxt: the template context (unused) """ waiting_for = None