All: Can you set sort to more than one option and if so how? Thanks, Todd
inside DTML you can use "_.sequence.sort()". The same functionaly can be used in Python by import DocumentTemplate.SortEx.sort(). For further documentation refer to the documentation (online help or Zope Book). Andreas ----- Original Message ----- From: "Todd Loomis" <tloomis@dmso.mil> To: <zope@zope.org> Sent: Thursday, September 27, 2001 08:40 Subject: [Zope] Sort Question
All:
Can you set sort to more than one option and if so how?
Thanks, Todd
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Thu, Sep 27, 2001 at 08:40:06AM -0400, Todd Loomis wrote:
Can you set sort to more than one option and if so how?
Extended Sort at your service, sir! :) <dtml-in documents sort="title/locale,date/cmp/desc"> (only Zope 2.4) Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
my Sort is : sort="getId/desc" but error show: Error Type: KeyError Error Value: desc how set sort to desc? ----- Original Message ----- From: "Oleg Broytmann" <phd@phd.pp.ru> To: <zope@zope.org> Sent: Thursday, September 27, 2001 9:53 PM Subject: Re: [Zope] Sort Question
On Thu, Sep 27, 2001 at 08:40:06AM -0400, Todd Loomis wrote:
Can you set sort to more than one option and if so how?
Extended Sort at your service, sir! :)
<dtml-in documents sort="title/locale,date/cmp/desc"> (only Zope 2.4)
Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
On Fri, Sep 28, 2001 at 11:42:27AM +0800, ╩ф╤╛ wrote:
my Sort is : sort="getId/desc" but error show: Error Type: KeyError Error Value: desc how set sort to desc?
If you use asc/desc you must pass a comparison function. If you have no special comparison function - use cmp: sort="getId/cmp/desc" Oleg. ---- Oleg Broytmann http://phd.pp.ru/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
participants (4)
-
Andreas Jung -
Oleg Broytmann -
Todd Loomis -
黄冬