Hello,
How can I insert a conditional python expresion inside a ZPT.
Example:
if (my_expresion):
toreturn = a
else:
toreturn = b
return toretun
Thank you!
___
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
Dieter Maurer wrote:
Peter Bengtsson wrote at 2006-12-4 11:52 +:
...
File /home/peterbe/zope/zope288/Products/Mest/ProductPhotoBase.py,
line 130, in _addProductPhoto
photo_adder = self.manage_addProduct['Photo'].manage_addPhoto
File
What about putting the code snippet in a python script and then calling it
from ZPT?
Put it in a script like mycondition, and then
div tal:define=x here/mycondition
!-- use x here --
/div
Regards
Marco
On 12/5/06, Daniel de la Cuesta [EMAIL PROTECTED] wrote:
Hello,
How can I insert a
if (my_expresion):
toreturn = a
else:
toreturn = b
return toretun
Try:
tal:define=toreturn python: my_expression and a or b
but you need to be aware that 'a' has to be logical True
in context of this statement (if a may be 0 or '' then this
may fail).
or
tal:define=toreturn
Hi.. I want to start learning ZPT since I heard from a lot of people that dtml
is too outdated. Could anyone point me in the right direction? What should I
starts on?
Yahoo! Music Unlimited
Access over 1
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On 5. Dezember 2006 02:44:36 -0800 Allen Huang [EMAIL PROTECTED] wrote:
Hi.. I want to start learning ZPT since I heard from a lot of people that
dtml is too outdated. Could anyone point me in the right direction? What
should I starts on?
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On 5. Dezember 2006 20:31:21 +0100 Ferhat Ayaz
[EMAIL PROTECTED] wrote:
Hello,
is it possible to connect a ssl crypted smtp server like googlemail with
MailHost?
Look at SecureMailHost which is part of Plone.
- -aj
-BEGIN PGP
I've installed it. But there is no way to set user/password. At least
I didn't found anyway.
On Dec 5, 2006, at 10:15 PM, Andreas Jung wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On 5. Dezember 2006 20:31:21 +0100 Ferhat Ayaz
[EMAIL PROTECTED] wrote:
Hello,
is it possible
Hi, I have copied the folder of the ZJetDA-0.1.1 product on the
directory C:\Zope\2.10,1 \ Zope \ lib \ python \ Products and
restarted Zope. If I go in the Control panel --Product management, I
can visualize it, but how can I use it? how to create an instance of it
in my project…
Probably I
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On 5. Dezember 2006 22:18:09 +0100 Ferhat Ayaz
[EMAIL PROTECTED] wrote:
I've installed it. But there is no way to set user/password. At least I
didn't found anyway.
We don't believe that. The API tells you clearly that the constructors
Hi, I have copied the folder of the ZJetDA-0.1.1 product
Have you seen how old ZJetDA is? I'm not surprised
it doesn't work with Zope2.10.
If you want to use this you'll possibly have to modify
it's code.
Better look for different database adapter. I think
that mxODBC might be best solution
Summary of messages to the zope-tests list.
Period Mon Dec 4 12:00:00 2006 UTC to Tue Dec 5 12:00:00 2006 UTC.
There were 9 messages: 9 from Zope Unit Tests.
Test failures
-
Subject: FAILED (failures=2) : Zope-2.8 Python-2.4.4 : Linux
From: Zope Unit Tests
Date: Mon Dec 4
Hi
Anybody uses DCOracle2 under 64 bit machine?
Any problems with that?
We have some problems under RHEL4 and 64
bit Operton CPU. Under heavy load our Zope
is just restarting. /var/log/messages says:
(...) kernel: python[10526]: segfault at a0084c10 rip
002a959041a0 rsp
13 matches
Mail list logo