Open
Description
Migrated issue, originally created by Cody Taylor (@CodeMan99)
The default_filters
argument to a TemplateLookup
could use some deeper explaining.
When I added a default HTML filter at work today there was some confusion as to why the template rendered as normal. It required about a hour of thinking and code examples before the light bulb went off. Perhaps we both were being dense, but here are my suggestions.
- Mention in syntax that writing is separate from filtering (unless captured).
- Explain default_filters before
<%page expression_filters="n" />
. - Explain that
<%page expression_filters="h" />
will append to any existingdefault_filters
list. - (Maybe) state in API documention that default_filters does not apply to
<%block>
<%def>
and<%page>
's unbuffered writes. - Provide an example of a
<%def>
that does not buffer in the buffering section. In particular state that the buffered example doesreturn buf.getvalue()
instead ofreturn ''
.
Relates to #111.
As always willing to implement upon agreement.