[Twisted-web] RE: [Twisted-Python] Log in - state of the art?

Alessandro Praduroux pradu at pradu.it
Sat Nov 6 12:24:35 EST 2004


Alle 01:26, sabato 6 novembre 2004, Mike C. Fletcher ha scritto:
> Alexander May wrote:
> ...
....
>
>         if newres is None:
>             from nevow.rend import FourOhFour
>             return context.PageContext(tag=FourOhFour(),
> parent=pageContext)
>
> where FourOhFour is just an IResource, but short of actually assigning
> to nevow.rend.FourOhFour I don't see a way to override it.
>
> Good luck,
> Mike

with nevow 0.2, I used to do the following in the root resource:

class Root(rend.Page):

    def __init__(self, original):
        super(Page, self).__init__(original)
        self.remember(self,inevow.ICanHandleNotFound)    

    def renderHTTP_notFound(self, request):
        return MyFourOFourPage()

I think/hope this still works, but haven't tried it recently


>
> ________________________________________________
>   Mike C. Fletcher
>   Designer, VR Plumber, Coder
>   http://www.vrplumber.com
>   http://blog.vrplumber.com
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

-- 
Pradu
Linux webmaster & sysadmin
pradu at pradu.it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20041106/a091fd32/attachment.pgp 


More information about the Twisted-Python mailing list