aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mako/codegen.py
Commit message (Collapse)AuthorAgeFilesLines
* move lib/mako to makoMike Bayer2010-02-051-765/+0
|
* - update copyright for 2010Mike Bayer2010-02-051-24/+73
| | | | - start work on #98
* happy new yearrel_0_2_5Mike Bayer2009-09-071-1/+1
|
* - Added a "decorator" kw argument to <%def>,Mike Bayer2009-03-191-0/+10
| | | | | | | | 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.
* - the <%namespacename:defname> syntax described atMike Bayer2008-11-151-2/+11
| | | | | | | | | | | | 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.
* cache sends in a "defname" parameter so that the cache can map settings to ↵Mike Bayer2008-10-171-3/+3
| | | | | | that name, instead of the key. eliminates the need to store all Value objects which will use up RAM in a dynamic-key scenario.
* - cached blocks now use the current context when renderingrel_0_2_2Mike Bayer2008-06-231-3/+3
| | | | | an expired section, instead of the original context passed in [ticket:87]
* - fixed a critical issue regarding caching, wherebyMike Bayer2008-06-231-5/+18
| | | | | | a cached block would raise an error when called within a cache-refresh operation that was initiated after the initiating template had completed rendering.
* - bumped magic number, which forces template recompile forrel_0_2_1Mike Bayer2008-06-161-1/+1
| | | | | | | this version (fixes incompatible compile symbols from 0.1 series). - added a few docs for cache options, specifically those that help with memcached.
* - dict/locals placed in mako-private namespace, [ticket:84]Mike Bayer2008-06-021-2/+4
|
* - some refinements to FastEncodingBuffer re: unicodeMike Bayer2008-05-031-5/+2
| | | | - fixed buffering when disable_unicode is used
* - CHANGES cleanupMike Bayer2008-05-031-17/+19
| | | | | | | - 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()
* remove erroneous extra line of declaresMike Bayer2008-05-031-2/+0
|
* - added "bytestring passthru" mode, via `disable_unicode=True`Mike Bayer2008-03-221-8/+16
| | | | | | | | | | 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)
* - cache_key argument can now render arguments passedMike Bayer2008-03-011-13/+13
| | | | | | directly to the %page or %def, i.e. <%def name="foo(x)" cached="True" cache_key="${x}"/> [ticket:78]
* copyright !Mike Bayer2008-01-191-1/+1
|
* - fixed codegen bug which occured when using <%page> levelMike Bayer2008-01-191-4/+4
| | | | | caching, combined with an expression-based cache_key, combined with the usage of <%namespace import="*"/>
* - variable names declared in render methods by internalMike Bayer2007-06-161-11/+11
| | | | | codegen prefixed by "__M_" to prevent name collisions with user code
* - fixed codegen bug when defining <%def> within <%call> within <%call>Mike Bayer2007-05-021-1/+2
|
* - Lexer/Compile exceptions propigate throughout lexer/parsetree/astMike Bayer2007-04-211-6/+7
| | | | | | | | | 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
* the <%call> test bumps up magic numberMike Bayer2007-04-141-1/+1
|
* - added an explicit stack frame step to template runtime, whichMike Bayer2007-04-141-24/+46
| | | | | | | | 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.
* adjustments to the buffer_filters arg so it works right with cached/bufferedMike Bayer2007-03-271-5/+6
|
* - added "n" filter, disables *all* filters normally applied to an expressionMike Bayer2007-03-271-15/+15
| | | | | | | | | | | 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)
* added "cache_url" argument passthru for memcachedMike Bayer2007-03-161-1/+1
|
* - <%include> has an "args" attribute that can pass arguments to the calledMike Bayer2007-03-081-2/+6
| | | | template (keyword arguments only, must be declared in that page's <%page> tag.)
* - got defs-within-defs to be cacheableMike Bayer2007-03-011-6/+11
|
* - improvement to scoping of "caller" variable when using <%call> tagMike Bayer2007-02-191-2/+3
|
* changed around filtering so you can just say "decode.utf8" or ↵Mike Bayer2007-01-291-4/+19
| | | | "decode.<whatever>" for generic expression decoding
* - support for CRLF templates...whoops ! welcome to all the windows users.Mike Bayer2007-01-291-1/+0
| | | | | [ticket:16] - cleanup in unit tests
* - small fix to local variable propigation for locals that are conditionally ↵Mike Bayer2007-01-261-1/+1
| | | | declared
* - "expression_filter" argument in <%page> applies only to expressionsMike Bayer2007-01-241-12/+27
| | | | | | | | | | - 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.
* copyright updateMike Bayer2007-01-051-1/+1
|
* - fix to code generation to correctly track multiple defs with the same name.Mike Bayer2007-01-051-13/+16
| | | | | | | 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
* - implemented "module" attribute for namespace [ticket:7]Mike Bayer2007-01-041-1/+1
|
* - fix to expression filters so that string conversion (actually unicode) ↵Mike Bayer2007-01-031-2/+2
| | | | | | | | | 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')
* der, expiretime, not timeoutMike Bayer2007-01-021-3/+3
|
* - fix so that "cache_timeout" parameter is propigatedMike Bayer2007-01-021-3/+10
|
* - added "encoding()" filter; this allows a filter expression to specify the ↵Mike Bayer2006-12-311-1/+8
| | | | | | | encoding and error handling for the given expression. usage is like: ${data | encoding('utf-8', errors='strict')}
* further try/except AST fixes, cleanup of filter unit tests, made __locals ↵Mike Bayer2006-12-311-1/+1
| | | | propigation in codegen slightly simpler/faster
* fixes, lots of new docsMike Bayer2006-12-301-8/+9
|
* filter docs, filtering functionsMike Bayer2006-12-171-1/+4
|
* py2.3 tweaksMike Bayer2006-12-161-2/+2
|
* ok the default "catchall" at the page level is now **pageargs, useableMike Bayer2006-12-161-2/+4
| | | | by the template but otherwise not affected
* took out the whole "auto-propigation of **kwargs" thing,Mike Bayer2006-12-161-11/+16
| | | | | implemented "args" for <%page> tag. still has a default "**_extra_pageargs" catchall for now...
* - fixes and tests involving exceptions propigating from buffered/ccall sectionsMike Bayer2006-12-151-1/+1
| | | | - more docs
* some tweaking around with the render method, template lookups, getting ↵Mike Bayer2006-12-141-4/+4
| | | | direct def calls to work
* cache file args, can be supplied on TemplateLookup, Template, <%page> tag, ↵Mike Bayer2006-12-121-2/+14
| | | | <%def> tag
* some refinements to the **kwargs sent to the main render() methodMike Bayer2006-12-111-11/+15
|
* propigate main body **kwargs to top-level defsMike Bayer2006-12-111-1/+1
| | | | more docs