[Zope] multi key dtml-in sorts
Tres Seaver
tseaver@palladion.com
Sun, 09 Apr 2000 22:33:20 -0500
"Dr. Ross Lazarus" <rossl@med.usyd.edu.au>
>
> <dtml-in "foo" sort=akey> is really handy as everyone knows.
>
> I needed to sort on multiple fields for an application I have, so I
> hacked at
> lib/python/DocumentTemplate/DT_In.py so the following now appears to
> work
>
> <dtml-in "foo" sort=akey1,akey2,akey3>
>
> This is only VERY lightly tested which is why I'm posting it here. If
> anyone needs this, please try it - but NOT on a production server.
> Please let me know how you go. If it proves useable, I'd suggest it
> eventually might be worth considering for a future release since without
> this patch, if you need multiple keys you have to fake them in your data
> which is cruel..
>
> I haven't even tried the mapping version code and I suspect that it's
> unlikely to work, but, in the spirit of opensource, for those of a self
> destructive urge and strong stomach, here's the diff.
>
> This is highly experimental..PLEASE don't even think about using this
> unless you're willing to clean up any mess that results. All care, no
> responsibility.
>
> Note that the patch will rename the original method to osort_sequence so
> you can easily revert to normal operation.
So that we don't lose track of this in the list traffic, could you please submit
this to the Collector as a "Feature with Patch" (bugs/features with patches get
priority treatment)?
http://classic.zope.org:8080/Collector/Collector/developer_input
Paste the patch into the "Description" field, along with the explanation.
Thanks!
Tres.
--
=========================================================
Tres Seaver tseaver@digicool.com tseaver@palladion.com