Jinja 1.1 Release Announcement
Jinja 1.1 is out now. Jinja is a sandboxed template engine written in pure Python licensed under the BSD license. It provides a Django-like non-XML syntax and compiles templates into executable python code. It's basically a combination of Django templates and python code.
Changes
- It's now possible to render the parent block of a block using {{ super() }}.
- The debugging system works now with any traceback system using linecache, also if it does not provide the module globals like it should. You can also disable the traceback system for debugging on the application itself.
- Template designers can now control whitespaces around tags.
- The security system got a major cleanup.
- Strings in the template not including any non-ASCII character is processed as bytestring. This works around problems with datetime.strftime which does not accept unicode strings.
- Improved {{ debug() }}, it can now display the documentation for all registered filters and tests.
- Added new filters:
- batch and slice for batching and slicing of sequences. Useful for multicolum lists.
- sub, abs and round where added.
- striptags and xmlattr where added for easier SGML/XML processing.
- The {% trans %} tag does not need explicit naming for valirables any more. You can now use {% trans foo, bar %} as alias for {% trans foo=foo, bar=bar %}.
- fixed many small bugs and improved source documentation.
- added new functions to the Environment class.
- implemented basic Buffet support.
- improved parser and lexer, it's now possible to use block delimiters as variable delimiters too. Also braces, parantheses and brackets are balanced now, thus you can use { as delimiter and still use the dict literal in it.
- implemented {% call %} which allows you to pass a callable block to macros and functions
- Added am optional C implementation of the context which speeds up variable access.
- improved loader system, it's now easier to add your own caching layer to already existing loaders.
- Added the MemcachedLoaderMixin contributed by Bryan McLemore.
- implemented streaming system, you can now render a template step by step which allows you to render huge templates without waiting for the rendering to finish.
For a complete list of changes have a look at the changelog.