[ZPT] Trouble understanding syntax for accessing modules from ZPT's

Evan Simpson evan@zope.com
Tue, 04 Dec 2001 17:08:17 -0500


Lynn Walton wrote:

> I'm trying to access the DocumentTemplate/sequence/SortEx module from a
> ZPT and I've tried about every variation I can think of: and can't get
> it.


It doesn't have the security declarations necessary to import it using 
'modules', but 'sequence' is directly available as a Python builtin:

<p tal:repeat="ob python:sequence.sort(container.objectValues(), (('meta_type',),))"
   tal:content="ob/id | nothing">Object</p>


Cheers,

Evan @ Zope