SVN: r25686 - trunk/quixote/doc

David Binger <dbinger-fVcApmY9cLvQ3/1i3zOLAti2O/[email protected]> Mon, 6 Dec 2004 19:01:11 -0500
Newsgroups gmane.comp.web.quixote.cvs
Message-ID <[email protected]>
Author: dbinger
Date: 2004-11-30 14:53:11 -0500 (Tue, 30 Nov 2004)
New Revision: 25686

Modified:
   trunk/quixote/doc/PTL.txt
Log:
Add note about $-substitution.


Modified: trunk/quixote/doc/PTL.txt
===================================================================
--- trunk/quixote/doc/PTL.txt	2004-11-30 19:52:31 UTC (rev 25685)
+++ trunk/quixote/doc/PTL.txt	2004-11-30 19:53:11 UTC (rev 25686)
@@ -222,7 +222,22 @@
 Python and a second one implemented as a C extension.  Both versions
 have seen production use.  
 
+$-substitution in templates.
+----------------------------
 
+In Quixote 2, ptl was modified to provide automatic $-substitution
+in literals in templates.  The substitution works like Python 2.4's
+string.Template class, except that it is implemented by a compile-time
+transformation.  The transformation causes expressions like 
+
+  '<h1>${title}</h1>' or '<h1>$title</h1>'
+
+to mean 
+
+  ('<h1>%(title)s</h1>' % vars())
+
+To escape this transformation, use '$$' to replace '$'.
+
 PTL modules
 -----------