Re: [Repoze-dev] Chameleon vs. jQuery templating, round one

2010-10-13 Thread Paul Everitt
On Oct 13, 2010, at 3:39 AM, Malthe Borch wrote: > On 12 October 2010 13:40, Paul Everitt wrote: >> In the first case, Chameleon refuses to parse the zpt because Expat tries to >> interpret <% as a startTag. In the second case...needless to say, it is >> ironic that we have overlap in syntax.

Re: [Repoze-dev] Chameleon vs. jQuery templating, round one

2010-10-13 Thread Malthe Borch
On 12 October 2010 13:40, Paul Everitt wrote: > In the first case, Chameleon refuses to parse the zpt because Expat tries to > interpret <% as a startTag.  In the second case...needless to say, it is > ironic that we have overlap in syntax.  I then tried wrapping a CDATA around > the block, but

Re: [Repoze-dev] Chameleon vs. jQuery templating, round one

2010-10-12 Thread Wichert Akkerman
On 2010-10-12 19:40, Paul Everitt wrote: > > Hi all. Before this floats out of my brain, I thought I'd write it down and > see what people think. > > In the past few months I've done a bit of client-side templating in jQuery, > first using John Resig's microtemplating: > >http://ejohn.org/bl

Re: [Repoze-dev] Chameleon vs. jQuery templating, round one

2010-10-12 Thread Chris Rossi
On Tue, Oct 12, 2010 at 3:45 PM, Paul Everitt wrote: > > You're right, I forgot to mention that this was going to be the plan I went > with to get around Chameleon parse-time problems. On one hand, it kinda > goes against the accepted pattern for doing client-side > templating...everybody just j

Re: [Repoze-dev] Chameleon vs. jQuery templating, round one

2010-10-12 Thread Paul Everitt
You're right, I forgot to mention that this was going to be the plan I went with to get around Chameleon parse-time problems. On one hand, it kinda goes against the accepted pattern for doing client-side templating...everybody just jams stuff into the original page. OTOH: 1) It results in th

Re: [Repoze-dev] Chameleon vs. jQuery templating, round one

2010-10-12 Thread Chris Rossi
I suspect you're going to want to store client side template separately from the ZPT and inject it at render time. Does this work? In Python: jstemplate = "blah blah blah <% some expression %> blah blah" rendered = render_template("template.pt", jstemplate=jstemplate) In ZPT: blah blah