| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
- start work on #98
|
| |
|
|
|
|
|
|
|
|
| |
allows custom decoration functions to wrap
rendering callables. Mainly intended for
custom caching algorithms, not sure what
other uses there may be (but there may be).
Examples are in the "filtering" docs.
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://techspot.zzzeek.org/?p=28 has now
been added as a built in syntax, and is recommended
as a more modern syntax versus <%call expr="expression">.
The %call tag itself will always remain,
with <%namespacename:defname> presenting a more HTML-like
alternative to calling defs, both plain and
nested. Many examples of the new syntax are in the
"Calling a def with embedded content" section
of the docs.
|
|
|
|
|
|
| |
that name, instead of the key.
eliminates the need to store all Value objects which will use up RAM in a dynamic-key scenario.
|
|
|
|
|
| |
an expired section, instead of the original context
passed in [ticket:87]
|
|
|
|
|
|
| |
a cached block would raise an error when called within a
cache-refresh operation that was initiated after the
initiating template had completed rendering.
|
|
|
|
|
|
|
| |
this version (fixes incompatible compile symbols from 0.1
series).
- added a few docs for cache options, specifically those that
help with memcached.
|
| |
|
|
|
|
| |
- fixed buffering when disable_unicode is used
|
|
|
|
|
|
|
| |
- some functions on Context are now private:
_push_buffer(), _pop_buffer(),
caller_stack._push_frame(), caller_stack._pop_frame().
- implemented [ticket:76] inlining of context.write()
|
| |
|
|
|
|
|
|
|
|
|
|
| |
argument passed to Template or TemplateLookup. All
unicode-awareness and filtering is turned off, and template
modules are generated with the appropriate magic encoding
comment. In this mode, template expressions can only
receive raw bytestrings or Unicode objects which represent
straight ASCII, and render_unicode() may not be used.
[ticket:77] (courtesy anonymous guest)
|
|
|
|
|
|
| |
directly to the %page or %def, i.e.
<%def name="foo(x)" cached="True" cache_key="${x}"/>
[ticket:78]
|
| |
|
|
|
|
|
| |
caching, combined with an expression-based cache_key,
combined with the usage of <%namespace import="*"/>
|
|
|
|
|
| |
codegen prefixed by "__M_" to prevent name collisions
with user code
|
| |
|
|
|
|
|
|
|
|
|
| |
using a more portable **exception_kwargs collection
- added "source" member to the dict propigated to Lexer/Compile exceptions
- RichTraceback can access original template source as a unicode object
using either 'source' memebr on Lexer/Compile exception, or 'source'
property on ModuleInfo, fixes #37
- unit tests for #37
|
| |
|
|
|
|
|
|
|
|
| |
allows much simpler and hopefully bug-free tracking of 'caller',
fixes #28
- if plain Python defs are used with <%call>, a decorator
@runtime.supports_callable exists to ensure that the "caller"
stack is properly handled for the def.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
via <%page> or default_filters (but not those within the filter)
- added buffer_filters argument, defines filters applied to the return value
of buffered/cached/filtered %defs, after all filters defined with the %def
itself have been applied. allows the creation of default expression filters
that let the output of return-valued %defs "opt out" of that filtering
via passing special attributes or objects.
- added support for "class" structures in ast parsing (i.e. class-level
data members wont get added to the "declared" list)
|
| |
|
|
|
|
| |
template (keyword arguments only, must be declared in that page's <%page> tag.)
|
| |
|
| |
|
|
|
|
| |
"decode.<whatever>" for generic expression decoding
|
|
|
|
|
| |
[ticket:16]
- cleanup in unit tests
|
|
|
|
| |
declared
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
|
|
| |
this is implemented by changing the "topleveldefs" and "closuredefs" collections
from a Set to a dictionary. a unit test was added with alternate set-ordering
as the original issue only appeared on linux to start.
- "backslash" -> "slash" in syntax doc
|
| |
|
|
|
|
|
|
|
|
|
| |
properly
occurs before filtering
- removed encoding() filter - it conflicts with the fact that unicode conversion has to
occur on the value first before being sent to the filter. recommended way for encoded
strings is to just say unicode(x, encoding='whatever')
|
| |
|
| |
|
|
|
|
|
|
|
| |
encoding and error
handling for the given expression.
usage is like: ${data | encoding('utf-8', errors='strict')}
|
|
|
|
| |
propigation in codegen slightly simpler/faster
|
| |
|
| |
|
| |
|
|
|
|
| |
by the template but otherwise not affected
|
|
|
|
|
| |
implemented "args" for <%page> tag. still has a default
"**_extra_pageargs" catchall for now...
|
|
|
|
| |
- more docs
|
|
|
|
| |
direct def calls to work
|
|
|
|
| |
<%def> tag
|
| |
|
|
|
|
| |
more docs
|