[ZPT] tal:repeat over the sorted keys of a dictionary

Jean Jordaan jean at upfrontsystems.co.za
Fri Jul 25 12:46:55 EDT 2003


.. the subject says it all. I want to do something like:

        <ul tal:define="keys licenses/keys; sortedkeys keys/sort"
            tal:repeat="key sortedkeys">
            <li tal:content="python:licenses[key]" />
        </ul>

Unfortunately, "keys/sort" (and "python:keys.sort()") return None.
What am I missing?

-- 
Jean Jordaan
http://www.upfrontsystems.co.za




More information about the ZPT mailing list