[Twisted-web] guarded example using external login form file
psanchez at nortel.com
Thu Apr 28 10:20:10 MDT 2005
On Thu, 2005-28-04 at 17:45 +0200, Thomas HERVE wrote:
> Quoting Pedro Sanchez <psanchez at nortel.com>:
> > 1) I don't understand what the third parameters(noLogout and
> > resc.logout) in these return statements do:
> > def requestAvatar(self, avatarId, mind, *interfaces):
> > ...
> > return (inevow.IResource, resc, noLogout)
> > ...
> > return (inevow.IResource, resc, resc.logout)
> > Can you give me a hint?
> It's the method called when you access the guard.LOGOUT_AVATAR url. So
> "noLogout" when you're Anonymous (you can't log out when you're
> anonymous), and
> resc.logout which is a specific method.
resc.logout has this single statement
print "%s logged out!" % self.original
Why is then that I never see this message? After I login, I click
"Logout", and it takes me back to the login page. Or is it that it goes
by so quickly that I don't see it?
> > 2) Now I'm trying to move the LoggedIn class into an external
> > "welcome.html" file. I get this error (files follow my signature):
> > exceptions.AttributeError: 'NoneType' object has no attribute 'load'
> docfactory != docFactory
Dummy me! thanks.
More information about the Twisted-web