ANN: Templayer 1.4 - HTML templating library

Ian Ward ian at
Mon Sep 25 17:18:15 CEST 2006

Announcing Templayer 1.4

Templayer home page:


About this release:

This release improves integration with the Django web framework by 
reducing the amount of code required in Django views and by allowing use 
of Django forms in Templayer templates.  Also, two new HTML Markup tags 
were added and it is now possible for flat template files (files with no 
layers) to be used.

New in this release:

   - Added a django_form convenience function for using Templayer
     with the Django web framework's FormWrapper objects.

   - Added an allow_degenerate parameter to Template.__init__.  If
     set to True then a template file that is missing a contents
     block will be accepted and not cause an exception to be raised.

   - Added a special layer name '*' that treats the entire contents
     of a template file as a layer.

   - Added two new HTML Markup elements:
     - ('pluralize',count,singular_markup,plural_markup) inserts
       singular_markup if count equals one, and plural_markup
     - ('&',entity) inserts the given HTML entity where valid
       entity values include "gt", "#161" and "#xA9".

   - FileLayer.close now returns the file object to which it wrote.
     This simplifies the code required to use Templayer in Django
     view functions.

   - Fixed a really obvious bug in the html_href function.

About Templayer

Templayer was created to offer an alternative to the more common ways of
generating dynamic HTML: embedding code within the HTML or embedding
HTML within code. Instead of mixing HTML and Python, two rich and
extremely expressive languages, Templayer adds a small amount of syntax
to each and keeps the two separate and coherent.

Templayer is released under the GNU LGPL.

More information about the Python-announce-list mailing list