Skip to content
Snippets Groups Projects
  1. Mar 12, 2012
  2. Mar 09, 2012
  3. Feb 21, 2012
  4. Feb 02, 2012
  5. Jan 28, 2012
  6. Jan 21, 2012
  7. Jan 19, 2012
  8. Jan 16, 2012
  9. Dec 28, 2011
  10. Oct 01, 2011
    • Mike Bayer's avatar
      - Template caching has been converted into a plugin · 643701f1
      Mike Bayer authored
        system, whereby the usage of Beaker is just the
        default plugin.   Template and TemplateLookup
        now accept a string "cache_impl" parameter which
        refers to the name of a cache plugin, defaulting
        to the name 'beaker'.  New plugins can be
        registered as pkg_resources entrypoints under
        the group "mako.cache", or registered directly
        using mako.cache.register_plugin().  The
        core plugin is the mako.cache.CacheImpl
        class.
      
      - The <%def>, <%block> and <%page> tags now accept
        any argument named "cache_*", and the key
        minus the "cache_" prefix will be passed as keyword
        arguments to the CacheImpl methods.
      
      - Template and TemplateLookup now accept an argument
        cache_args, which refers to a dictionary containing
        cache parameters.  The cache_dir, cache_url, cache_type,
        cache_timeout arguments are deprecated (will probably
        never be removed, however) and can be passed
        now as cache_args={'url':<some url>, 'type':'memcached',
        'timeout':50, 'dir':'/path/to/some/directory'}
      643701f1
  11. Sep 28, 2011
    • Mike Bayer's avatar
      - A Template is explicitly disallowed · 5cd508ff
      Mike Bayer authored
        from having a url that normalizes to relative outside
        of the root.   That is, if the Lookup is based
        at /home/mytemplates, an include that would place
        the ultimate template at
        /home/mytemplates/../some_other_directory,
        i.e. outside of /home/mytemplates,
        is disallowed.   This usage was never intended
        despite the lack of an explicit check.
        The main issue this causes
        is that module files can be written outside
        of the module root (or raise an error, if file perms aren't
        set up), and can also lead to the same template being
        cached in the lookup under multiple, relative roots.
        TemplateLookup instead has always supported multiple
        file roots for this purpose.
        [ticket:174]
      rel_0_5_0
      5cd508ff
  12. Aug 05, 2011
  13. Jul 08, 2011
  14. Apr 06, 2011
    • Mike Bayer's avatar
      - New tag: <%block>. A variant on <%def> that · 4a19e4d9
      Mike Bayer authored
        evaluates its contents in-place.
        Can be named or anonymous,
        the named version is intended for inheritance
        layouts where any given section can be
        surrounded by the <%block> tag in order for
        it to become overrideable by inheriting
        templates, without the need to specify a
        top-level <%def> plus explicit call.
        Modified scoping and argument rules as well as a
        more strictly enforced usage scheme make it ideal
        for this purpose without at all replacing most
        other things that defs are still good for.
        Lots of new docs. [ticket:164]
      4a19e4d9
  15. Mar 22, 2011
  16. Feb 21, 2011
    • Mike Bayer's avatar
      - the "ascii encoding by default" approach doesn't work in Py3K, · 76f27c80
      Mike Bayer authored
      because a string and an ascii encoded string are of course
      different things, and we'd like render() by default to return a
      string.   So go the other way, use FEB in all cases,
       add a new flag bytestring_passthrough which goes back to StringIO,
      to support that one guy who wanted to force a bytestring through
      in an expression.
      76f27c80
    • Mike Bayer's avatar
      - the keys() in the Context, as well as · 6c06a327
      Mike Bayer authored
        it's internal _data dictionary, now
        include just what was specified to
        render() as well as Mako builtins
        'caller', 'capture'.  The contents
        of __builtin__ are no longer copied.
      6c06a327
    • Mike Bayer's avatar
      - use inlined getargspec · 4737c269
      Mike Bayer authored
      - The "output encoding" now defaults
        to "ascii", whereas previously
        it was set to None.  This has the effect
        of FastEncodingBuffer being used internally
        by default when render() is called, instead
        of cStringIO or StringIO, which are
        slower, but allow bytestrings with
        unknown encoding to pass right through.
        It is of course not recommended to use
        bytestrings of unknown encoding. Usage of
        the "disable_unicode" mode also requires
        that output_encoding be set to None.
      4737c269
  17. Jan 19, 2011
  18. Nov 13, 2010
  19. Nov 12, 2010
  20. Nov 10, 2010
    • Mike Bayer's avatar
      - The range of Python identifiers that · ca21a535
      Mike Bayer authored
        are considered "undefined", meaning they
        are pulled from the context, has been
        trimmed back to not include variables
        declared inside of expressions (i.e. from
        list comprehensions), as well as
        in the argument list of lambdas.  This
        to better support the strict_undefined
        feature.
      ca21a535
    • Mike Bayer's avatar
      - New flag on Template, TemplateLookup - · c8598ab6
      Mike Bayer authored
        strict_undefined=True, will cause
        variables not found in the context to
        raise a NameError immediately, instead of
        defaulting to the UNDEFINED value.
      c8598ab6
  21. Oct 20, 2010
  22. Aug 11, 2010
  23. Jun 30, 2010
    • Mike Bayer's avatar
      - The <%namespace> tag allows expressions · 4b408e5f
      Mike Bayer authored
        for the `file` argument, i.e. with ${}.
        The `context` variable, if needed,
        must be referenced explicitly.
        [ticket:141]
      
      - Fixed previously non-covered regular
        expression, such that using a ${} expression
        inside of a tag element that doesn't allow
        them raises a CompileException instead of
        silently failing.
      4b408e5f
  24. Jun 22, 2010
    • Mike Bayer's avatar
      - Now using MarkupSafe for HTML escaping, · a0354c3e
      Mike Bayer authored
        i.e. in place of cgi.escape().  Faster
        C-based implementation and also escapes
        single quotes for additional security.
        Supports the __html__ attribute for
        the given expression as well.
      
        When using "disable_unicode" mode,
        a pure Python HTML escaper function
        is used which also quotes single quotes.
      
        Note that Pylons by default doesn't
        use Mako's filter - check your
        environment.py file.
      a0354c3e
    • Mike Bayer's avatar
      - Fixed call to "unicode.strip" in · 808dde14
      Mike Bayer authored
        exceptions.text_error_template which
        is not Py3k compatible.  [ticket:137]
      808dde14
  25. May 31, 2010
    • Mike Bayer's avatar
      - Added conditional to RichTraceback · 3ef596c2
      Mike Bayer authored
        such that if no traceback is passed
        and sys.exc_info() has been reset,
        the formatter just returns blank
        for the "traceback" portion.
        [ticket:135]
      - some long line cleanup
      3ef596c2
  26. Apr 28, 2010
    • Mike Bayer's avatar
      - When a .py is being created, the tempfile · c4abbd84
      Mike Bayer authored
        where the source is stored temporarily is
        now made in the same directory as that of
        the .py file.  This ensures that the two
        files share the same filesystem, thus
        avoiding cross-filesystem synchronization
        issues.  Thanks to Charles Cazabon.
      c4abbd84
  27. Apr 17, 2010
  28. Apr 13, 2010
Loading