[Zope] Detecting a NULL Value
d.chirila at finsiel.ro
Fri Feb 27 09:09:14 EST 2004
To test in python that a field from MySQL is null test for a None value.
<dtml-if expr="undergraduate_projects_directed == None">
<dtml-call "REQUEST.set('undergraduateProjectsDirected', 'Hello')">
----- Original Message -----
From: "Asad Habib" <ahabib at engin.umich.edu>
To: <zope at zope.org>
Sent: Friday, February 27, 2004 3:55 PM
Subject: [Zope] Detecting a NULL Value
> I have a field in my MySQL database which is allowed to be null and has a
> value of NULL as default. I am retrieving this field and numerous others
> using a call to dtml-in. After the retrieval, I would like to determine
> what this value is inside my DTML document/method. What is the equivalent
> of NULL in Zope? Is it a value of 'None'?
> I am using the following code but it doesn't work.
> <dtml-if expr="undergraduate_projects_directed == 'None'">
> <dtml-call "REQUEST.set('undergraduateProjectsDirected', 'Hello')">
> Any help would be greatly appreciated. Thanks.
> - Asad
> Zope maillist - Zope at zope.org
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-dev )
More information about the Zope