[ANN] Etcher - Another Django template language implementation

Rory Byrne rory@REDACTED
Mon Jan 25 03:56:25 CET 2010


Hi Everyone,

I've just uploaded an implementation of the Django Template Language
to github:

    http://github.com/jinsky/etcher

This project shouldn't be seen as any kind of reflection on ErlyDTL.
I haven't done any tests, but I suspect that ErlyDTL is faster and
more efficient that Etcher. (I'm re-using their date formatting code,
so at least that part of Etcher should be quick! ;-))

The purpose of Etcher, is to provide a flexible, feature complete,
implementation of the Django Template Language. An implementation
that is highly compatible with Django's own version. Developers
should be able to switch between Python and Erlang without touching
their web templates. That's the goal.

For non-tech reasons, I'm releasing this project a little earlier
than I would have liked. It's currently about 90% feature complete
but it's still quite rough around the edges.

What's Done?
------------

 * Supports 19 of the 24 standard tags.

 * Supports all 56 standard filters.

   The date formatting code was taken from the ErlyDTL project
   (http://code.google.com/p/erlydtl/), so Roberto and Evan deserve
   full credit for this.

 * Full unicode support.

 * (X)HTML Auto-Escaping is handled just like in Django.

 * Supports custom tags and filters. You can even override the
   standard ones if you want/need to.

   Note that the 'load' tag isn't implemented yet, and the API
   related to custom tags and filters will likely to change when it
   is.

 * The context you pass in can contain a mix of nested records, lists
   and proplists.

   To use records you will need to inform the etcher application about
   these records in advance. This is simple to do, you can just pass
   it the name of a hrl file containing your record definitions.


What's NOT Done Yet?
--------------------

 * 5 standard tags, mostly related to template inheritence and
   template/file inclusion.

   The tags are: 'block', 'extends', 'include', 'load' and 'ssi'.

 * Error Reporting. Yeah, error reporting is abysmal at the moment.
   It certain needs to be improved.

 * Documentation. The vast bulk of Etcher's functionality is covered
   by Django's excellent documentation, specifically this page:

     http://docs.djangoproject.com/en/1.1/ref/templates/builtins/

   However, there is still lots of Etcher specific stuff that needs
   to be documented.

 * More testing (both unit and system testing) is needed.


Thanks to the OTP team, and to anyone else who was involved in
bringing the new Regular Expressions, and Unicode, functionality to
Erlang. It's made the world of difference in programming web-related
stuff like this.

Cheers,

Rory



More information about the erlang-questions mailing list