[ZPT] tal:repeat over the sorted keys of a dictionary
Jean Jordaan
jean at upfrontsystems.co.za
Fri Jul 25 18:36:11 EDT 2003
> <ul tal:repeat="key licenses/keys/format:sort">
> <li tal:content="licenses/key" />
> </ul>
OK, then 'format' is a script that takes the output of 'keys',
passes it to 'sort', and returns the result? If it's ubiquitous,
fine .. otherwise, I like the 'dummy' route sans helper scripts
more.
Is '<li tal:content="licenses/key" />' a feature deriving from
the proposed changes? As is, it raises a KeyError on 'key'. So
one has to '<li tal:content="python:licenses[key]" />'. Hmm, I
think we're stuck with the "python:" there ..
--
Jean Jordaan
http://www.upfrontsystems.co.za
More information about the ZPT
mailing list