[Twisted-web] Nevow athena

Christopher Zorn christopher.zorn at gmail.com
Thu Apr 27 12:56:40 CDT 2006


  I have been using livepage in a project and I use gaurd and
twisted.cred for different livepage resources. Everything works well,
but I wanted to use athena. I run into two problems with athena. The
first problem is when I have one athena.Livepage object in my realm I
get errors saying I can only render the LivePage once.

So, to get around that I just do something like the following in the
realm class :

 def requestAvatar(self, avatarId, mind, *interfaces):
       for iface in interfaces:
           if iface is inevow.IResource:
               if avatarId is checkers.ANONYMOUS:
                   resc = AnonPage()
                   resc.realm = self
                   return (inevow.IResource, resc, noLogout)
                   resc = MyPage(avatarId)
                   resc.realm = self
                   return (inevow.IResource, resc, resc.logout)

This seems to work ok. Is this something I have to do? Or can I use
one class that takes avatarId as a paramater on __init__?

Now for the second problem. (This problem happens after I use the above fix. )

If I use checkers.InMemoryUsernamePasswordDatabaseDontUse() everything
works ok. But if I use my checker or other checkers the page does not
get rendered and everything just hangs. If I run my tac file with
twisted -noy I can not control-C to kill the process, I have to kill
it with signal 9.

I have tried a basic athena.LivePage class with nothing but html,
body, and liveglue that is supposed to be rendered out and it still

Everything works well with livepage.LivePage, but hangs with athena.
Does anyone know why this would happen? I hope this email is not too
vague. Let me know if I need more details.

Thanks in advance.

More information about the Twisted-web mailing list