[Zope-dev] Can't get ZClass baseclass to behave as DTML Method

Martijn Faassen m.faassen@vet.uu.nl
Thu, 09 Sep 1999 15:12:26 +0200


Martijn Faassen wrote:
> 
> Evan Simpson wrote:
> > Zope checks an object for 'index_html' *before* '__call__', so if your
> > object can acquire one, that's what will get rendered.  To prevent that,
> > you can do what the DTML objects do, and set index_html to None.
> >
> > If you *can* do that with a ZClass.  Hmm.  Well, hopefully, this'll lead
> > you in the right direction.
> 
> I'll try and report back to the list. Thanks!

It worked! Thanks!

You can do it with a ZClass. Apparently you need to call the __call__
arguments exactly like Phillip Eby  mentioned in response to an earlier
question of mine:

def __call__(me, self, REQUEST):
    ...

Thanks Phillip!

This does NOT work for some reason:

def __call__(self, client, REQUEST):
    ...

Regards,

Martijn