[Zope-DB] Testing for empty result set
Dieter Maurer
dieter at handshake.de
Thu Mar 24 14:45:10 EST 2005
Charlie Clark wrote at 2005-3-24 13:44 +0100:
> ...
>your right tal:condition is what you should be using. However, as
>Results-Objects with empty records are not None you still need a little
>Python test to get things to work correctly.
>
><div tal:condition="python: len(context.myZSQL())">
While an empty result set is not "None", it behaves as a
Python "false" value.
Therefore, you can (and should) use
tal:condition="context/myZSQL"
--
Dieter
More information about the Zope-DB
mailing list