How to update list from dtml?
Dear Zopistas, How to do in DTML something similar in python: foo[1] = 3.5 In DTML this does not work: <dtml-call "REQUEST.set('foo[1]', 3.5)"> Note, that I have list foo[,,,,,,,] already defined Many thanks, J. Lukesh
On 4/14/06, Jaroslav Lukesh <lukesh@seznam.cz> wrote:
Dear Zopistas,
How to do in DTML something similar in python:
foo[1] = 3.5
You call a python file that does it. Really, you don't want to start doing those things in DTML, it just gets very complicated very fast. -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/
Try: <dtml-call "foo.append(3.5)"> Jonathan ----- Original Message ----- From: "Jaroslav Lukesh" <lukesh@seznam.cz> To: <zope@zope.org> Sent: Friday, April 14, 2006 10:22 AM Subject: [Zope] How to update list from dtml?
Dear Zopistas,
How to do in DTML something similar in python:
foo[1] = 3.5
In DTML this does not work:
<dtml-call "REQUEST.set('foo[1]', 3.5)">
Note, that I have list foo[,,,,,,,] already defined
Many thanks,
J. Lukesh
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
From: Jonathan [mailto:dev101@magma.ca] Try:
<dtml-call "foo.append(3.5)">
I need to insert that at specific position, not append at end of the list. Thanks, JL.
----- Original Message ----- From: "Jaroslav Lukesh" <lukesh@seznam.cz>
foo[1] = 3.5
In DTML this does not work:
<dtml-call "REQUEST.set('foo[1]', 3.5)">
Note, that I have list foo[,,,,,,,] already defined
--On 14. April 2006 18:40:46 +0200 Jaroslav Lukesh <lukesh@seznam.cz> wrote:
From: Jonathan [mailto:dev101@magma.ca] Try:
<dtml-call "foo.append(3.5)">
I need to insert that at specific position, not append at end of the list.
A look at a basic Python tutorial documentation will tell you about the methods and ways to deal with Python lists. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting
participants (4)
-
Andreas Jung -
Jaroslav Lukesh -
Jonathan -
Lennart Regebro