[Grok-dev] Re: How do I mimick the standard_error_page of Zope 2.x?

Philipp von Weitershausen philipp at weitershausen.de
Thu Sep 20 05:00:19 EDT 2007


On 20 Sep 2007, at 09:04 , Sebastian Ware wrote
> I don't seem to get this right. I was hoping that this grok.View  
> class would be called whenever the INotFound exception was thrown  
> (thus redirecting to the Index view of that exception).

It doesn't redirect. It just gets the default view for the exception.

> But all I get is the Rotterdam skin.

Um, because the default view for exceptions is called 'index.html',  
as already discussed in this thread. Look at Leonardo's example more  
carefully.

>   class NotFound(grok.View):
>       grok.context(publisher.interfaces.INotFound)
>       #grok.context(common.interfaces.IException)
>       grok.name("index")
>
>       def render(self):
>           return "There was an error finding the resource you were  
> looking for!"





More information about the Grok-dev mailing list