Skip to content
Snippets Groups Projects
  1. May 14, 2012
    • Vincent Férotin's avatar
      Fix some various typos in documentation: · d8af6f5e
      Vincent Férotin authored
      fix misspelled words, remove line ending spaces, change ``-`` to ``--``,
      add some ``'`` between subject and 'to be' verb (e.g. "it's", "i'm"),
      add some ending dots to sentences, change some letters "capitalness", etc.
      d8af6f5e
  2. Mar 30, 2012
  3. Mar 24, 2012
  4. Feb 21, 2012
  5. Jan 16, 2012
  6. 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
  7. 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
  8. 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
      - fix uncovered bug in FastEncodingBuffer · 1936fc61
      Mike Bayer authored
      - misc cleanup
      1936fc61
    • 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
  9. Feb 19, 2011
  10. Jan 19, 2011
  11. Nov 13, 2010
    • Mike Bayer's avatar
      - more cleanup · fe823ebd
      Mike Bayer authored
      - move Namespace docs inline to attributes on Namespace
      - document Cache methods, add to caching.rst
      - use functools.partial for partials, part of [ticket:156]
      fe823ebd
  12. Nov 12, 2010
  13. Nov 10, 2010
  14. 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
  15. 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
  16. Apr 13, 2010
  17. Mar 05, 2010
  18. Mar 04, 2010
  19. Mar 02, 2010
    • Mike Bayer's avatar
      - ensure lru threading test doesn't run · 004aca56
      Mike Bayer authored
      - Source code escaping has been simplified.
        In particular, module source files are now
        generated with the Python "magic encoding
        comment", and source code is passed through
        mostly unescaped, except for that code which
        is regenerated from parsed Python source.
        This fixes usage of unicode in
        <%namespace:defname> tags.  [ticket:99]
      004aca56
  20. Feb 05, 2010
  21. Sep 07, 2009
  22. May 19, 2009
  23. Jan 13, 2009
  24. Oct 25, 2008
    • Mike Bayer's avatar
      - beaker bump · a6793784
      Mike Bayer authored
      - added "cache_enabled=True" flag to Template,
        TemplateLookup.  Setting this to False causes cache
        operations to "pass through" and execute every time;
        this flag should be integrated in Pylons with its own
        cache_enabled configuration setting.
      a6793784
  25. Sep 27, 2008
    • Mike Bayer's avatar
      - added "cache" accessor to Template, Namespace. · 041b60f5
      Mike Bayer authored
        e.g.  ${local.cache.get('somekey')} or
        template.cache.invalidate_body()
      
      - the Cache object now supports invalidate_def(name),
        invalidate_body(), invalidate_closure(name),
        invalidate(key), which will remove the given key
        from the cache, if it exists.  The cache arguments
        (i.e. storage type) are derived from whatever has
        been already persisted for that template.
        [ticket:92]
      041b60f5
  26. Sep 07, 2008
  27. Jun 09, 2008
  28. Apr 12, 2008
  29. Apr 11, 2008
  30. Mar 22, 2008
    • Mike Bayer's avatar
      - added "bytestring passthru" mode, via `disable_unicode=True` · d5f83e69
      Mike Bayer authored
        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)
      d5f83e69
  31. Feb 15, 2008
  32. Jan 19, 2008
Loading