[Zope] Re: Zope digest, Vol 1 #1641 - 48 msgs
Oleg Broytmann
Oleg Broytmann <phd@phd.pp.ru>
Fri, 7 Sep 2001 18:05:10 +0400
On Fri, Sep 07, 2001 at 03:12:45PM +0100, Tim Hicks wrote:
> > > 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).
>
> Sorry, I'm not sure if I was totally clear in my original question. If I
> understand correctly, using you suggestion would result in the query
> returning all items in the catalog whose title attribute matches the string
> "search". I want to be able to return all items whose title attribute
> matches the variable 'search' which is in the request (i.e. if the url ends
> like this: results_py?search=portrait , portrait is the string that is
> searched for in the 'title' index).
Then it seems you have no variable "search" in the namepsace. Other than
that you are correct.
Oleg.
----
Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.