<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>collective.templateengines</name>
<shortdesc>Generic interface for Python template engines</shortdesc>
<description>Introduction
============

collective.templateengines  is an pluggable template language backend manager for Python. 
It defines generic interfaces which abstracts template language basic interfaction.

Template Backend helps you to achieve

* Easy, pluggable, template language switching

* Clean your codebase from template language dependencies

Motivation
----------

All template engines have their shortcomings. Sooner or later you want to try yet another of them,
or someone else wants to use another template engine with your project. This product
is aimed to make that transition as smooth as possible, maybe just one line change.

Features
--------

* EGG deployment and easy install support (PyPi repository)

* Interfaces defined using standard `Zope interfaces &lt;http://wiki.zope.org/Interfaces/FrontPage&gt;`_ package

* Backends for: `Django template Language &lt;http://docs.djangoproject.com/en/dev/topics/templates/&gt;`_, `Cheetah &lt;http://www.cheetahtemplate.org/&gt;`_

* Unit test suite

Usage
-----

The following example shows how one can switch between Django and Cheetah template engines with one line of change.
Naturally, the templates themselves need to be refactored.

Cheetah::

  from collective.templateengines.backends import cheetah

  engine = cheetah.Engine()
  context = DictionaryContext({"foo":"bar"})
  template, syntax_errors = engine.loadString("Show variable $foo", False)
  result, evaluation_errors = template.evaluate(context)
  
Django::

  from collective.templateengines.backends import djangotemplates

  engine = djangotemplates.Engine()
  context = DictionaryContext({"foo":"bar"})
  template, syntax_errors = engine.loadString("Show variable {{ foo", False)
  result, evaluation_errors = template.evaluate(context)


TODO
----

* Generic mechanism to register template tags

* Secure context support (Zope, Plone)

Problems
--------

* Cheetah architecture lacks separate exposed compiling and evaluating phases

* Cheetah exposes the full Python namespace to templates by default, making it hard to secure it

* Cheetah cannot traverse Zope functions or attributes

Examples
--------

Python Template Engines is used in 

* `Easy Template product &lt;http://plone.org/products/easy-template&gt;`_ for Plone.

Author
------

Mikko Ohtamaa

`Red Innovation Oy, Oulu, Finland &lt;http://www.redinnovation.com&gt;`_ - High quality Python hackers for hire






Changelog
=========

0.1 - Unreleased
----------------

* Initial release</description>
<homepage rdf:resource="http://pypi.python.org/pypi?%3Aaction=pkg_edit&amp;name=collective.templateengines" />
<maintainer><foaf:Person><foaf:name>Mikko Ohtamaa</foaf:name>
<foaf:mbox_sha1sum>0f94491614af5dbee4e0e04d02dc1eaf8de15348</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>0.1</revision></Version></release>
</Project></rdf:RDF>