- "expression_filter" argument in <%page> applies only to expressions
- added "default_filters" argument to Template, TemplateLookup. applies only to expressions, gets prepended to "expression_filter" arg from <%page>. defaults to ["unicode"], so that all expressions get stringified into u'' by default (this is what Mako already does). By setting to [], expressions are passed through raw. - added "imports" argument to Template, TemplateLookup. so you can predefine a list of import statements at the top of the template. can be used in conjunction with default_filters.
Showing
- CHANGES 8 additions, 0 deletionsCHANGES
- lib/mako/codegen.py 27 additions, 12 deletionslib/mako/codegen.py
- lib/mako/filters.py 1 addition, 0 deletionslib/mako/filters.py
- lib/mako/lookup.py 2 additions, 2 deletionslib/mako/lookup.py
- lib/mako/template.py 17 additions, 11 deletionslib/mako/template.py
- test/filters.py 18 additions, 0 deletionstest/filters.py
- test/template.py 10 additions, 2 deletionstest/template.py
Loading
Please register or sign in to comment