Skip to content
Snippets Groups Projects
  1. Feb 15, 2013
  2. Nov 12, 2012
  3. Nov 11, 2012
  4. Nov 10, 2012
  5. Nov 09, 2012
    • Benjamin Trofatter's avatar
      Added futures support to mako · 38cd2bb4
      Benjamin Trofatter authored
      Provide a list of names to import from __future__ to Template or
      TemplateLookup, and it will render the import from __future__
      statement at the top of the generated code so that it actually works.
      38cd2bb4
  6. Aug 30, 2012
  7. Jul 08, 2012
  8. Apr 06, 2012
  9. Apr 03, 2012
  10. Mar 30, 2012
  11. Mar 24, 2012
  12. Mar 09, 2012
  13. Jan 18, 2012
  14. Jan 16, 2012
    • Mike Bayer's avatar
      2012 · 0050ca81
      Mike Bayer authored
      0050ca81
    • Mike Bayer's avatar
      - [feature/bug] Can now refer to context variables · 2879f8bc
      Mike Bayer authored
        within extra arguments to <%block>, <%def>, i.e.
        <%block name="foo" cache_key="${somekey}">.
        Filters can also be used in this way, i.e.
        <%def name="foo()" filter="myfilter">
        then template.render(myfilter=some_callable)
        [ticket:180]
      2879f8bc
  15. 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
  16. Aug 05, 2011
  17. 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
  18. Feb 19, 2011
  19. Jan 19, 2011
  20. Nov 10, 2010
  21. 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
  22. Mar 05, 2010
  23. Mar 04, 2010
  24. Mar 02, 2010
    • Mike Bayer's avatar
      use builtin set() completely · 4d91d760
      Mike Bayer authored
      4d91d760
    • 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
  25. Feb 05, 2010
  26. Sep 07, 2009
  27. Mar 19, 2009
    • Mike Bayer's avatar
      - Added a "decorator" kw argument to <%def>, · da73752b
      Mike Bayer authored
        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.
      da73752b
  28. Nov 15, 2008
    • Mike Bayer's avatar
      - the <%namespacename:defname> syntax described at · 718d98ee
      Mike Bayer authored
        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.
      718d98ee
  29. Oct 17, 2008
  30. Jun 23, 2008
Loading