[Zope] Re: Sorting on 2 or more properties

Andreas Jung Andreas Jung <andreas@andreas-jung.com>
Sat, 19 Apr 2003 22:12:17 +0200


Check out the sequence.sort() method (see Zope Book for details).

-aj

--On Samstag, 19. April 2003 22:12 Uhr +0200 Josef Meile 
<jmeile@hotmail.com> wrote:

>> I would like to sort first on the professor_name, then course_number,
>> and then finally student_name. I have googled and can only find examples
>> for sorting on one property at a time.
> I don't know if at the present you can do such things without extra
> programming,
> but when I asked it long, long time ago (when I was starting with zope),
> the answer
> was to create a third index with the concatenated values of my keys.
>
> In your case:
> professor_name, course_number, and student_name. Of couse, you will
> have to limit the size of those fields and add white spaces at the end.
>
> Regards,
> Josef
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )