Overview
--------
The z3c.pt package provides an alternative implementation of the TAL
template language including i18n.
In a nutshell:
- Templates are bytecode-compiled
- Only Python-expressions are supported
- Depends only on lxml
The METAL macro language is not supported.
Template and expression language
--------------------------------
The template and expression language is based loosely on the TAL 1.4
specification*. Some notable changes:
1. Only Python-expressions are allowed. Expressions can have
try-except fallbacks using the vertical bar syntax:
tal:content="<expression> | <first fallback> | <second fallback> | ..."
2. Tuples are allowed in the tal:define statement:
tal:define="(a, b, c) [1, 2, 3]"
3. Generators are allowed in tal:repeat statements. Note that the
repeat variable is not available in this case.
tal:repeat="i <some generator>"
4. Attribute-access to dictionary entries is allowed, e.g.
dictionary.key
can be used instead of ``dictionary['key']``.
*) http://wiki.zope.org/ZPT/TALSpecification14Changelog
---------
Version 0.4 - in development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version 0.3 - December 23, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Code optimization; bug fixing spree
[malthe]
- Added ``ViewPageTemplateFile`` class
[malthe]
- Added support for i18n
[malthe]
- Engine rewrite; improved code generation abstractions
[malthe]
Version 0.2 - December 5, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Major optimizations to the generated code
[malthe]
Version 0.1 - December 3, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- First public release
[malthe]
--------
The z3c.pt package provides an alternative implementation of the TAL
template language including i18n.
In a nutshell:
- Templates are bytecode-compiled
- Only Python-expressions are supported
- Depends only on lxml
The METAL macro language is not supported.
Template and expression language
--------------------------------
The template and expression language is based loosely on the TAL 1.4
specification*. Some notable changes:
1. Only Python-expressions are allowed. Expressions can have
try-except fallbacks using the vertical bar syntax:
tal:content="<expression> | <first fallback> | <second fallback> | ..."
2. Tuples are allowed in the tal:define statement:
tal:define="(a, b, c) [1, 2, 3]"
3. Generators are allowed in tal:repeat statements. Note that the
repeat variable is not available in this case.
tal:repeat="i <some generator>"
4. Attribute-access to dictionary entries is allowed, e.g.
dictionary.key
can be used instead of ``dictionary['key']``.
*) http://wiki.zope.org/ZPT/TALSpecification14Changelog
---------
Version 0.4 - in development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Version 0.3 - December 23, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Code optimization; bug fixing spree
[malthe]
- Added ``ViewPageTemplateFile`` class
[malthe]
- Added support for i18n
[malthe]
- Engine rewrite; improved code generation abstractions
[malthe]
Version 0.2 - December 5, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Major optimizations to the generated code
[malthe]
Version 0.1 - December 3, 2007
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- First public release
[malthe]
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
z3c.pt-0.3.1.tar.gz
(16.8 kB
view details)
File details
Details for the file z3c.pt-0.3.1.tar.gz.
File metadata
- Download URL: z3c.pt-0.3.1.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8ea09ca4d39172fe5f0cd218e2bd9ebc2405f9b3c9cc7a6b52d886308b6c06a3
|
|
| MD5 |
8c9861a7b98b163ab03eaa72d7d5d11b
|
|
| BLAKE2b-256 |
ff0906b093bb95d57c53628f2e54d80c108b7b32e86ffa1fbbea1e9edb234383
|