Improve filtering/buffering documentation.
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- python
- Domain
- documentation
Research direction
Start with syntax.html#expression-escaping, filtering.html sections on default_filters and buffering, and usage.html#mako.template.Template.params.default_filters. Compare the requested explanations and examples across those sections, including expression_filters ordering, unbuffered writes, and the buffered return value; done means each of the five documentation suggestions is addressed consistently.
Written by the indexing model from the issue text.
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_filterslist. - (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.
- Dominant language
- Python
- Stars
- 459
- Forks
- 90
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sqlalchemy/mako
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
sqlalchemy/mako#432 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sqlalchemy/mako#417 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
sqlalchemy/mako#392 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
sqlalchemy/mako#382 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
sqlalchemy/mako#376 · 9 comments ·
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·