On 11.12.2008 12:28 Uhr, Peter Bengtsson wrote:
Personally I prefer to always use objectValues(). Sorting isn't
objectXXX()'s problem. It's something you do in your view.
objs = list(self.objectValues())
objs.sort(lambda x,y: cmp(x.id, y.id))
Never ever use obj.id. The official API is obj.getI
2008/12/11 robert rottermann <[EMAIL PROTECTED]>:
> Garry Saddington schrieb:
>> On Tuesday 09 December 2008 03:15, Andreas Jung wrote:
>>> On 08.12.2008 21:11 Uhr, robert rottermann wrote:
Garry Saddington schrieb:
> Can anyone help me sort the following by id in a python script?
>
>>
Garry Saddington schrieb:
> On Tuesday 09 December 2008 03:15, Andreas Jung wrote:
>> On 08.12.2008 21:11 Uhr, robert rottermann wrote:
>>> Garry Saddington schrieb:
Can anyone help me sort the following by id in a python script?
for object in context.objectValues(['Folder', 'DTML
>>
On 09.12.2008 8:45 Uhr, Garry Saddington wrote:
On Tuesday 09 December 2008 03:15, Andreas Jung wrote:
On 08.12.2008 21:11 Uhr, robert rottermann wrote:
Garry Saddington schrieb:
Can anyone help me sort the following by id in a python script?
for object in context.objectValues(['Folder', 'DTM
On Tuesday 09 December 2008 03:15, Andreas Jung wrote:
> On 08.12.2008 21:11 Uhr, robert rottermann wrote:
> > Garry Saddington schrieb:
> >> Can anyone help me sort the following by id in a python script?
> >>
> >> for object in context.objectValues(['Folder', 'DTML
> >> Document','ZipFolder','Fil
Andreas Jung schrieb:
> On 08.12.2008 21:11 Uhr, robert rottermann wrote:
>> Garry Saddington schrieb:
>>> Can anyone help me sort the following by id in a python script?
>>>
>>> for object in context.objectValues(['Folder', 'DTML
>>> Document','ZipFolder','File','Image']):
>>
>> objs=context.objec
On 08.12.2008 21:11 Uhr, robert rottermann wrote:
Garry Saddington schrieb:
Can anyone help me sort the following by id in a python script?
for object in context.objectValues(['Folder', 'DTML
Document','ZipFolder','File','Image']):
objs=context.objectValues(['Folder', 'DTMLDocument','ZipFolde
Garry Saddington schrieb:
> Can anyone help me sort the following by id in a python script?
>
> for object in context.objectValues(['Folder', 'DTML
> Document','ZipFolder','File','Image']):
objs=context.objectValues(['Folder', 'DTMLDocument','ZipFolder','File','Image'])
objs.sort()
for o in objs
On 08.12.2008 19:23 Uhr, Andreas Jung wrote:
On 08.12.2008 18:18 Uhr, Garry Saddington wrote:
Can anyone help me sort the following by id in a python script?
for object in context.objectValues(['Folder', 'DTML
Document','ZipFolder','File','Image']):
ids = context.objectIds()
Possibly you
On 08.12.2008 18:18 Uhr, Garry Saddington wrote:
Can anyone help me sort the following by id in a python script?
for object in context.objectValues(['Folder', 'DTML
Document','ZipFolder','File','Image']):
ids = context.objectIds()
ids.sort()
-aj
begin:vcard
fn:Andreas Jung
n:Jung;Andreas
or
Can anyone help me sort the following by id in a python script?
for object in context.objectValues(['Folder', 'DTML
Document','ZipFolder','File','Image']):
Import of sequence is not authorised in my python scripts, I am presuming
(probably wrongly) that sequence is needed for sort.
Regards
Garr
Hi;
I have this code:
?
???
? <>
???
?
?
???
???
?
?
???
?
???
It sorts the products by name correctly when I display the products (as you can
see at http://lariman.com and click "Store" then "cabuchones"), but if you
click on one
--On 25. Januar 2007 15:03:19 -0500 Kate Legere <[EMAIL PROTECTED]> wrote:
values=ao.objectItems(items)
values.sort(lambda a,b: cmp(a[0],b[0]))
Error Type: AttributeError
Error Value: 'tuple' object has no attribute 'sort'
This error message is self-explaining. You can on
I'd like to sort the items in a folder by relevance, relevance being a
property I've assigned.
I'm using a python script
for aj in ao.objectItems(items):
aao=aj[1] #the object
title=aao.title
id=aj[0]
aanum=len(aao.objectIds())
--On Donnerstag, 14. April 2005 15:25 Uhr +0200 Daniel Dekany
<[EMAIL PROTECTED]> wrote:
I see, but then my question is: How do people use Zope for sites where
"Unicode" is needed? They just don't use Zope in such cases? At my new
employer here is fat Plone site running for months with the menti
Thursday, April 14, 2005, 12:35:37 PM, Andreas Jung wrote:
> --On Donnerstag, 14. April 2005 12:20 Uhr +0200 Daniel Dekany
> <[EMAIL PROTECTED]> wrote:
>
>> I have a Zope 2.7.0(+Plone) instance that uses utf-8 encoding
>> everywhere. The problem is that alphabetical sorting (like with
>> DocumentT
--On Donnerstag, 14. April 2005 12:20 Uhr +0200 Daniel Dekany
<[EMAIL PROTECTED]> wrote:
I have a Zope 2.7.0(+Plone) instance that uses utf-8 encoding
everywhere. The problem is that alphabetical sorting (like with
DocumentTemplate.sequence.sort(seq, 'locale', ...)) is broken
everywhere: accente
I have a Zope 2.7.0(+Plone) instance that uses utf-8 encoding
everywhere. The problem is that alphabetical sorting (like with
DocumentTemplate.sequence.sort(seq, 'locale', ...)) is broken
everywhere: accented letters come after all US-ASCII characters. I have
locale=hu_HU.UTF-8 in zope.conf, still
OTECTED]>
Sent: Monday, November 06, 2000 8:17 AM
Subject: RE: [Zope] Sorting 'in'
> Yes, that is what I am doing, however was wanting
> to not have to write several Z SQL Methods. 8)
>
> ~~~
> Yvonne Totty
> Database Engineer
&
Hi Yvonne,
You could use Zieve, (http://www.zope.org/Members/sspickle/Zieve)
or you could render the 'order by' part of your clause from a variable
in the name space, or possibly the REQUEST itself. There was also a
patch submitting at one point that allows variable (and I think multiple)
so
hi yvonne,
in your zsql method, you can order by several variables in the same
method call.
so you can do it all in one method.
ciao!
greg.
Gregory Haley
Venaca.com
Yvonne Totty wrote:
>
> Yes, that is what I am doing, however was wanting
> to not have to write several Z SQL Methods. 8)
>
>
Yes, that is what I am doing, however was wanting
to not have to write several Z SQL Methods. 8)
~~~
Yvonne Totty
Database Engineer
-
Wolverine: You actually go outside in these things?
Cyclops: Well, what would you prefer? Yellow spande
If it's a database query sorting with sql first. i.e. ORDER BY X,Y
HTH
Dan
> Yvonne Totty wrote:
>
> Hi!
>
> I need a query sorted by 2-3 different attributes. The
> 'in' sort only lets me do it by one. Is there a way to
> get around it?
>
> TIA
> -y
> ~~~
Hi!
I
need a query sorted by 2-3 different attributes. The
'in' sort only lets me do it by one. Is there a way to
get
around it?
TIA
-y
~~~
Yvonne Totty
Database Engineer
-
Wolverine: You actually go outside
in these things?Cyc
Although this could be simpler (you dont need the REQUEST.set):
:
- Original Message -
From: "Max Møller Rasmussen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 03, 2000 8:05 AM
Subject: [Zope] Sorting and accessing elements in
tober 03, 2000 8:05 AM
Subject: [Zope] Sorting and accessing elements in the
> I am making a mailer zClass where it will only be nessecary to make the
form
> fields with the values you want to send, then the zClass will give you a
> reply on the webpage and send a nicely formatted e-ma
I am making a mailer zClass where it will only be nessecary to make the form
fields with the values you want to send, then the zClass will give you a
reply on the webpage and send a nicely formatted e-mail.
The problem is that the form elements are unknown but they need to be set up
in predictabl
Tim Cook wrote:
>
> Michael Bernstein wrote:
> >
> > Here's my problem: I want to sort a list of objects on a property that
> > not all items have. So I'm doing this:
> >
> >
> >
> > The problem is that those items that have a blank someProperty are
> > listed first, when I want them at the bott
Michael Bernstein wrote:
>
> Hello all,
>
> Here's my problem: I want to sort a list of objects on a property that
> not all items have. So I'm doing this:
>
>
>
> The problem is that those items that have a blank someProperty are
> listed first, when I want them at the bottom of the list. I
Hello all,
Here's my problem: I want to sort a list of objects on a property that
not all items have. So I'm doing this:
The problem is that those items that have a blank someProperty are
listed first, when I want them at the bottom of the list. I don't want
to reverse the entire sort order, I
Hi Zopers (and Lex),
>From the (excellent) 'How-To: XMLDocument Example' (Created
by eukreign. Last modified on 2000/06/06) I get the following
to display all the nodes of an XML document:
/edit">edit
/delete">delete
I want somet
RC Compaan writes:
> I have a list:
> mylist=[('R',31),('I',80),('A',80),('S',23),('E',35),('C',21)]
>
> I want to rebuild the list sorted from high to low on the sequence-item.
>
> When i call the list gets
> sorted on the sequence-key not the sequence-item. As I understand the
> alp
I have a list:
mylist=[('R',31),('I',80),('A',80),('S',23),('E',35),('C',21)]
I want to rebuild the list sorted from high to low on the sequence-item.
When i call the list gets
sorted on the sequence-key not the sequence-item. As I understand the
alphabetical characters are the sequence-keys
Seems to work fine in Zope 2.1.6...
Pieter
-Original Message-
From: Jerome Alet [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 04, 2000 3:48 PM
To: Pieter Claerhout
Cc: '[EMAIL PROTECTED]'
Subject: Re: [Zope] Sorting a list descending using dtml-in
On Tue, 4 Jul 20
On Tue, 4 Jul 2000, Pieter Claerhout wrote:
> if I'm iterating over a list using the dtml-in tag, is it then possible
> to sort the items descending?
IIRC:
bye,
Jerome ALET - [EMAIL PROTECTED] - http://cortex.unice.fr/~jerome
Faculte de Medecine de Nice - http://noe.unice.fr - Tel: 04 93 3
On Tue, 4 Jul 2000, Pieter Claerhout wrote:
> if I'm iterating over a list using the dtml-in tag, is it then possible
> to sort the items descending?
Oleg.(All opinions are mine and not of my employer)
Oleg Broytmann Foundation for Effective Policies [EMAIL PR
Hello,
if I'm iterating over a list using the dtml-in tag, is it then possible
to sort the items descending?
Pieter
Pieter Claerhout
Application Support - CreoScitex Europe
___
Zope maillist - [EMAIL PROTECTED]
http://lists.zope.org/mailman/listi
Can you do a sort in a dtml-in by a propety of the object? What I want to do is
sort the documents in a folder by a fixed number set in a property of that
document. I tried something like this but it didn't work.
Any ideas how this could be accomplished?
Adrian
__
38 matches
Mail list logo