Re: creating lists of objects in tal

Charlie Clark <[email protected]> Thu, 7 Sep 2006 15:45:53 +0200
Newsgroups gmane.comp.web.zope.page-templates
Message-ID <[email protected]>
Am 07.09.2006 um 15:10 schrieb Sinan Kalkan:

> the "announcements python:[]" part in tal:define tag initializes the
> list, and the list becomes populated with the
> "a python:announcements.append(obj)" in tal:define tag.

You should assemble all your data structures outside of your template =20=

and pass them in. ZPT's run security checks on all objects which =20
might be one reason for slowing stuff down. I suspect if you rewrite =20
your code to use a single PythonScript then it will run a lot faster =20
and be a lot easier to work with.

Charlie
--
Charlie Clark
Helmholtzstr. 20
D=FCsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226