[Zope] sequence.sort on a property of contained objects

Andreas Jung lists at andreas-jung.com
Sat Oct 9 10:18:16 EDT 2004



--On Samstag, 9. Oktober 2004 22:13 Uhr +0800 Hong Yuan <obichina at 21cn.com> 
wrote:

>
> I try to use the following code to sort the folders:
> <ul tal:define="folders here/get_folders;
>                   sort_on python:(('property/menu_order', 'cmp', 'asc'),);
>                   sorted_folders python:sequence.sort(folders, sort_on)">
>
> But it seems the sort condition can not contain path expression to access
> 'property/menu_order'.

I have no idea why you think that you could use path expression at that 
point. The
documentation of sequence.sort() does not tell you about using path 
expressions.

Andreas



More information about the Zope mailing list