[Htmltmpl] some improvements
Brought to you by:
jakubvrana,
tripiecz
|
From: anders p. <an...@co...> - 2004-01-27 20:22:49
|
attached is a patch for html-tmpl-1.22 python library that has a few
improvements:
- tags are case insensitive, so you can do <TMPL_VAR> or <tmpl_var>,
etc.
- it handles linebreaks within tags, so <tmpl_var
name="foo"> is valid.
- you can specify an include directory other than "inc" by passing
an include_dir param to TemplateManager's constructor.
- a set_dict() method that allows you to set multiple template
variables at once
it still passes all the unit tests, and i've been using it on production
apps for a while now, so it should be pretty safe.
--
anders pearson : http://www.columbia.edu/~anders/
C C N M T L : http://www.ccnmtl.columbia.edu/
weblog : http://thraxil.org/
|