[Zope] Sorting a custom-built list with dtml-in
Andreas Jung
andreas at andreas-jung.com
Fri Aug 15 19:14:36 EDT 2003
--On Freitag, 15. August 2003 9:02 Uhr -0700 Robert Jean
<robertjean2 at yahoo.com> wrote:
> Hello,
>
> I have a DTML method that iterates over a list built
> by a Python script with the <dtml-in> tag. I want to
> be able to sort the list (with the attribute
> sort=sortColumn in the dtml-in tag). I have a few
> questions on this topic:
>
> 1) I assume that the dtml-in tag does not know how to
> sort a list of dictionaries having the same keys. It
> only knows how to sort Python class instances. Is it
> correct?
>
sequence.sort() allows you to specify your own cmp methods.
-aj
More information about the Zope
mailing list