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 p...@agendaless.com 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

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

2010-10-12 Thread Paul Everitt
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/blog/javascript-micro-templating/ ...as well as the

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 div

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