Mailing List Archive

Zope Catalog sorting
Hello,

I have a simple/silly question:

how can you sort the Catalog results with 2 parameters? Es:
sort_on='last_name', sort_on='first_name'... in the old days was
simple: sort='last_name, first_name'

Thank You,

Giampiero
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )
Re: Zope Catalog sorting [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Giampiero Benvenuti wrote:
> Hello,
>
> I have a simple/silly question:
>
> how can you sort the Catalog results with 2 parameters? Es:
> sort_on='last_name', sort_on='first_name'... in the old days was
> simple: sort='last_name, first_name'
>

no - use sequence.sort() instead.

- -aj
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwAs9wACgkQCJIWIbr9KYyeAwCfbyMdwIgT9TIWuh+Cd4p7dw3l
IooAoM+QBIIfZNifIs3aI6a2q0u+B8PG
=qE2n
-----END PGP SIGNATURE-----
Re: Zope Catalog sorting [ In reply to ]
I haven't tried it myself but the AdvancedQuery product from the
uber-zope-guru Dieter Maurer supports this:
http://www.dieter.handshake.de/pyprojects/zope/AdvancedQuery.html#bct_sec_4


On 28 May 2010 10:40, Giampiero Benvenuti
<giampiero.benvenuti@chiaroscuro.com> wrote:
> Hello,
>
> I have a simple/silly question:
>
> how can you sort the Catalog results with 2 parameters? Es:
> sort_on='last_name', sort_on='first_name'... in the old days was
> simple: sort='last_name, first_name'
>
> Thank You,
>
> Giampiero
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> https://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  https://mail.zope.org/mailman/listinfo/zope-announce
>  https://mail.zope.org/mailman/listinfo/zope-dev )
>



--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
fun crosstips.org
_______________________________________________
Zope maillist - Zope@zope.org
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )