[Zope] Kaivo CatalogQuery-0.1.1

Oleg Broytmann Oleg Broytmann <phd@phd.pp.ru>
Fri, 7 Sep 2001 12:59:05 +0400


On Fri, Sep 07, 2001 at 01:31:41AM +0100, Tim Hicks wrote:
> results = context.Catalog.query('title==search', REQUEST) # or paint==search
> or exhibition==search or style==search or for_sale==search)
> 
> >From this, I get:
> 
> Error Type: NameError
> Error Value: name 'search' is not defined

   The problem, I tink in the syntax 'title==search'. Here "title" is the
name of argument (passed to Python function), but you declare that "search"
is a name of a variable. You have no such variable, hence NameError. Try
'title=="search"' (thta is, pass "search" as a string, not var).

Oleg.
---- 
     Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.