Hi guys,

The following trivial patch lets dtml-sqltest make sense
of multiple inequality tests, that is: Currently

        <dtml-sqltest name op="ne" multiple>

has the funny behavior of rendering


when passed a single value, and

        name in (val1,val2)

when a list is passed. With this fix, the latter case becomes

        name not in (val1,val2)

(It might be considered a good idea to take care of the other
ops too, but that would be non-trivial ;-)

Have fun,

*** sqltest.py  Wed Jan 31 19:42:15 2001
--- old_sqltest.py      Tue May 30 18:46:55 2000
*** 222,229 ****
          if len(vs) > 1:
              vs=join(map(str,vs),', ')
-             if (self.op == comparison_operators['ne']):
-                 return "%s not in (%s)" % (self.column,vs)
              return "%s in (%s)" % (self.column,vs)
          return "%s %s %s" % (self.column, self.op, vs[0])
--- 222,227 ----

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to