ANN: Templayer 1.4 - HTML templating library

I

Ian Ward

Announcing Templayer 1.4
------------------------

Templayer home page:
http://excess.org/templayer/

Tarball:
http://excess.org/templayer/templayer-1.4.tar.gz


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
otherwise.
- ('&',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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top