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
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?
for object in
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
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','File','Image']):
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',
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
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
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
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 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',
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.objectValues(['Folder',
Hi;
I have this code:
table cellpadding=0 width=75% border=0
?? tal:define=category python:getattr(request, 'category', '');
?? items
python:here.EMarket.marketItems.getItemsInCategory(category);
?? sort_on python:(('name', 'cmp', 'desc'),);
??
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 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
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
--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: accented
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
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
~~~
Yvonne
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
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)
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)
TECTED]
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
-
Wolverine: You
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
ce-itemdtml-var item:
dtml-var "REQUEST.form[item]"
/dtml-let
/dtml-in
dtml-var standard_html_footer
- Original Message -
From: "Max Møller Rasmussen" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 03, 2000 8:05 AM
Subject: [Zope] Sorting and
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:
dtml-in "contacts[0].getElementsByTagName('contact')"
tr
td dtml-var
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 dtml-in mylist sort=sequence-item reverse the list gets
sorted on the sequence-key not the
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 dtml-in mylist sort=sequence-item reverse the list gets
sorted on the sequence-key not the
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 dtml-in mylist sort=sequence-item reverse the list gets
sorted on the sequence-key not the sequence-item. As I understand the
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]
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 2000, Pieter
30 matches
Mail list logo