[Zope] Re[3]: [Zope] full textsearch on own products !!

Rik Hoekstra rik.hoekstra@inghist.nl
Tue, 4 Apr 2000 21:36:56 +0200


>on Tuesday, April 04, 2000 Anders Holmbech Nielsen wrote :
>AHN> duh... Ok I didn't quite get it right the first time but now I have
>AHN> installed the PythonMethod module and made a Pythonmethod instead.
>AHN> Doing this I get this return:
>
>AHN> Error Type: NameError
>AHN> Error Value: self
>
>AHN> Still with this content in the method:
>AHN> return string.join((self.overskrift, self.indhold, self.forfattere),
';')
>
>
>works here..
>are you calling it for a Zclass instance, and not the Zclass
>itself when testing it ?
>
>yoursite.dk/YourZclassInstance/YourPythonMethod


Yes i call it from an instance of my zclass. ie:

http://dyn-90:8080/byg/artikler/953721827/raw

where "953721827" is the zclass. I have tried just to return a string
and that works fine. It seems that Zope cannot find the "self"
reference.


[rh]You'll have to give your PythonMethod an argument 'self'

Rik